From d58629b0745bee5dc001918789b6e8467cbd4e60 Mon Sep 17 00:00:00 2001 From: TDeSain Date: Sun, 8 Dec 2024 23:15:07 -0500 Subject: [PATCH 1/2] Remove DashboardDrawerList for direct List usage - Deleted `DashboardDrawerList` record from the project. - Updated `DashboardDrawerController` to return a `List`. - Modified `DashboardDrawerService` to utilize a `List` instead of `DashboardDrawerList`. - Changed `DashboardDrawerRepository` to return `Optional>`. - Adjusted SQL join in `getDashboardDrawerRows` to use a LEFT JOIN. --- .../dashboarddrawer/DashboardDrawerController.java | 4 +++- .../dictionary/dashboarddrawer/DashboardDrawerList.java | 6 ------ .../dashboarddrawer/DashboardDrawerRepository.java | 8 ++++---- .../dashboarddrawer/DashboardDrawerService.java | 8 +++----- 4 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerList.java diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerController.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerController.java index e94c058..b0bb6cc 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerController.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerController.java @@ -5,6 +5,8 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; +import java.util.List; + @Controller @RequestMapping("/dashboard-drawer") public class DashboardDrawerController { @@ -13,7 +15,7 @@ public class DashboardDrawerController { private DashboardDrawerService dashboardDrawerService; @GetMapping - public ResponseEntity findAll() { + public ResponseEntity> findAll() { return dashboardDrawerService.findAll().map(ResponseEntity::ok).orElseGet(() -> ResponseEntity.notFound().build()); } diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerList.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerList.java deleted file mode 100644 index 4b82955..0000000 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerList.java +++ /dev/null @@ -1,6 +0,0 @@ -package edu.harvard.dbmi.avillach.dictionary.dashboarddrawer; - -import java.util.List; - -public record DashboardDrawerList(List dashboardDrawerList) { -} diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java index 8f0d298..829016b 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java @@ -21,7 +21,7 @@ public DashboardDrawerRepository(NamedParameterJdbcTemplate template) { this.template = template; } - public List getDashboardDrawerRows() { + public Optional> getDashboardDrawerRows() { String materializedViewSql = """ select * from dictionary_db.dict.dataset_meta_materialized_view dmmv; """; @@ -37,15 +37,15 @@ public List getDashboardDrawerRows() { MAX(DISTINCT dm.value) FILTER (where dm.key IN ('sponsor')) sponsor FROM dataset d JOIN dataset_meta dm ON d.dataset_id = dm.dataset_id - JOIN consent c ON d.dataset_id = c.dataset_id + LEFT JOIN consent c ON d.dataset_id = c.dataset_id GROUP BY d.dataset_id """; try { - return template.query(materializedViewSql, new DashboardDrawerRowMapper()); + return Optional.of(template.query(materializedViewSql, new DashboardDrawerRowMapper())); } catch (Exception e) { log.debug("Materialized view not available, using fallback query. Error: {}", e.getMessage()); - return template.query(fallbackSql, new DashboardDrawerRowMapper()); + return Optional.of(template.query(fallbackSql, new DashboardDrawerRowMapper())); } } diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java index 4fbe1d8..0994b81 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java @@ -25,13 +25,11 @@ public DashboardDrawerService(DashboardDrawerRepository repository, @Value("${da * * @return All Dashboard Instances and their metadata. */ - public Optional findAll() { + public Optional> findAll() { if (dashboardLayout.equalsIgnoreCase("bdc")) { - List records = repository.getDashboardDrawerRows(); - return Optional.of(new DashboardDrawerList(records)); + return repository.getDashboardDrawerRows(); } - - return Optional.of(new DashboardDrawerList(new ArrayList<>())); + return Optional.of(new ArrayList<>()); } /** From a645d6f72bb125324d79290b43a2509529de0211 Mon Sep 17 00:00:00 2001 From: TDeSain Date: Fri, 13 Dec 2024 13:29:19 -0500 Subject: [PATCH 2/2] Refactor DashboardDrawer logic and add comprehensive tests - Updated `DashboardDrawerService` to use "default" layout as the fallback. - Simplified repository queries by removing materialized view checks. - Renamed methods in `DashboardDrawerRepository` for better clarity. - Removed `dashboard.layout.type` from `application-bdc.properties`. - Added unit and integration tests for `DashboardDrawerService`, `DashboardDrawerRepository`, and `DashboardDrawerController`. --- .../DashboardDrawerRepository.java | 32 ++----- .../DashboardDrawerService.java | 8 +- src/main/resources/application-bdc.properties | 1 - .../DashboardDrawerControllerTest.java | 73 ++++++++++++++++ .../DashboardDrawerRepositoryTest.java | 50 +++++++++++ .../DashboardDrawerServiceTest.java | 84 +++++++++++++++++++ .../dashboarddrawer/DashboardDrawerTest.java | 26 ++++++ 7 files changed, 243 insertions(+), 31 deletions(-) create mode 100644 src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerControllerTest.java create mode 100644 src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepositoryTest.java create mode 100644 src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerServiceTest.java create mode 100644 src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerTest.java diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java index 829016b..1f9897f 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepository.java @@ -1,7 +1,5 @@ package edu.harvard.dbmi.avillach.dictionary.dashboarddrawer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; @@ -14,19 +12,14 @@ public class DashboardDrawerRepository { private final NamedParameterJdbcTemplate template; - private static final Logger log = LoggerFactory.getLogger(DashboardDrawerRepository.class); - @Autowired public DashboardDrawerRepository(NamedParameterJdbcTemplate template) { this.template = template; } public Optional> getDashboardDrawerRows() { - String materializedViewSql = """ - select * from dictionary_db.dict.dataset_meta_materialized_view dmmv; - """; - String fallbackSql = """ + String sql = """ SELECT d.dataset_id, MAX(d.full_name) study_fullname, MAX(d.abbreviation) study_abbreviation, @@ -41,20 +34,12 @@ public Optional> getDashboardDrawerRows() { GROUP BY d.dataset_id """; - try { - return Optional.of(template.query(materializedViewSql, new DashboardDrawerRowMapper())); - } catch (Exception e) { - log.debug("Materialized view not available, using fallback query. Error: {}", e.getMessage()); - return Optional.of(template.query(fallbackSql, new DashboardDrawerRowMapper())); - } - } + return Optional.of(template.query(sql, new DashboardDrawerRowMapper())); - public Optional getDashboardDrawerRows(Integer datasetId) { - String materializedViewSql = """ - select * from dictionary_db.dict.dataset_meta_materialized_view dmmv where dmmv.dataset_id = :datasetId; - """; + } - String fallbackSql = """ + public Optional getDashboardDrawerRowsByDatasetId(Integer datasetId) { + String sql = """ SELECT d.dataset_id dataset_id, MAX(d.full_name) study_fullname, MAX(d.abbreviation) study_abbreviation, @@ -72,11 +57,6 @@ public Optional getDashboardDrawerRows(Integer datasetId) { MapSqlParameterSource params = new MapSqlParameterSource(); params.addValue("datasetId", datasetId); - try { - return template.query(materializedViewSql, params, new DashboardDrawerRowMapper()).stream().findFirst(); - } catch (Exception e) { - log.debug("Materialized view not available, using fallback query. Error: {}", e.getMessage()); - return template.query(fallbackSql, params, new DashboardDrawerRowMapper()).stream().findFirst(); - } + return template.query(sql, params, new DashboardDrawerRowMapper()).stream().findFirst(); } } diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java index 0994b81..32eee05 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerService.java @@ -15,7 +15,7 @@ public class DashboardDrawerService { private final String dashboardLayout; @Autowired - public DashboardDrawerService(DashboardDrawerRepository repository, @Value("${dashboard.layout.type}") String dashboardLayout) { + public DashboardDrawerService(DashboardDrawerRepository repository, @Value("${dashboard.layout.type:default}") String dashboardLayout) { this.repository = repository; this.dashboardLayout = dashboardLayout; } @@ -26,7 +26,7 @@ public DashboardDrawerService(DashboardDrawerRepository repository, @Value("${da * @return All Dashboard Instances and their metadata. */ public Optional> findAll() { - if (dashboardLayout.equalsIgnoreCase("bdc")) { + if (dashboardLayout.equalsIgnoreCase("default")) { return repository.getDashboardDrawerRows(); } return Optional.of(new ArrayList<>()); @@ -40,8 +40,8 @@ public Optional> findAll() { * @return a single Dashboard instance with drawer-specific metadata. */ public Optional findByDatasetId(Integer datasetId) { - if ("bdc".equalsIgnoreCase(dashboardLayout)) { - return repository.getDashboardDrawerRows(datasetId); + if (dashboardLayout.equalsIgnoreCase("default")) { + return repository.getDashboardDrawerRowsByDatasetId(datasetId); } return Optional.empty(); } diff --git a/src/main/resources/application-bdc.properties b/src/main/resources/application-bdc.properties index 8d0ce92..9751c8f 100644 --- a/src/main/resources/application-bdc.properties +++ b/src/main/resources/application-bdc.properties @@ -7,7 +7,6 @@ server.port=80 dashboard.enable.extra_details=true dashboard.enable.bdc_hack=true -dashboard.layout.type=bdc filtering.unfilterable_concepts=stigmatized diff --git a/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerControllerTest.java b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerControllerTest.java new file mode 100644 index 0000000..ffc4a25 --- /dev/null +++ b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerControllerTest.java @@ -0,0 +1,73 @@ +package edu.harvard.dbmi.avillach.dictionary.dashboarddrawer; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.ActiveProfiles; + +import java.util.List; +import java.util.Optional; + +import static org.mockito.Mockito.when; + + + +@SpringBootTest +@ActiveProfiles("test") +class DashboardDrawerControllerTest { + + @Autowired + private DashboardDrawerController subject; + + @MockBean + private DashboardDrawerService dashboardDrawerService; + + @Test + void shouldFindAllDashboardDrawers() { + DashboardDrawer sampleData1 = new DashboardDrawer( + 1, // dataset id + "Test Data Set 1", // study full name + "TDS1", // study abbreviation + List.of("group1", "group2"), // consent groups + "Test Study for Unit / Integration Testing", // study summary + List.of("Study Focus One", "Study Focus Two"), // study focus + "Test Study Design", // study design + "Test Study Sponsor" // study sponsor + ); + + DashboardDrawer sampleData2 = new DashboardDrawer( + 2, "Test Data Set 2", "TDS2", List.of("group2"), "Test Study for Unit / Integration Testing", List.of("Study Focus One"), + "Test Study Design", "Test Study Sponsor" + ); + + when(dashboardDrawerService.findAll()).thenReturn(Optional.of(List.of(sampleData1, sampleData2))); + + ResponseEntity> result = subject.findAll(); + + Assertions.assertEquals(HttpStatus.OK, result.getStatusCode()); + + List actualDrawerData = result.getBody(); + + Assertions.assertNotNull(actualDrawerData, "Expected non-null list of DashboardDrawer"); + Assertions.assertEquals(2, actualDrawerData.size(), "Expected two drawers in the result"); + } + + @Test + void shouldFindDashboardDrawerById() { + DashboardDrawer expectedDrawer = new DashboardDrawer( + 1, "Test Data Set 1", "TDS1", List.of("group1", "group2"), "Test Study for Unit / Integration Testing", + List.of("Study Focus One", "Study Focus Two"), "Test Study Design", "Test Study Sponsor" + ); + + when(dashboardDrawerService.findByDatasetId(1)).thenReturn(Optional.of(expectedDrawer)); + + ResponseEntity actualDrawer = subject.findByDatasetId(1); + + Assertions.assertEquals(expectedDrawer, actualDrawer.getBody()); + + } +} diff --git a/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepositoryTest.java b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepositoryTest.java new file mode 100644 index 0000000..8910734 --- /dev/null +++ b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerRepositoryTest.java @@ -0,0 +1,50 @@ +package edu.harvard.dbmi.avillach.dictionary.dashboarddrawer; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.DynamicPropertyRegistry; +import org.springframework.test.context.DynamicPropertySource; +import org.testcontainers.containers.PostgreSQLContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; +import org.testcontainers.utility.MountableFile; + +import java.util.List; +import java.util.Optional; + +@Testcontainers +@SpringBootTest +class DashboardDrawerRepositoryTest { + @Autowired + DashboardDrawerRepository subject; + + @Container + static final PostgreSQLContainer databaseContainer = new PostgreSQLContainer<>("postgres:16").withReuse(true) + .withCopyFileToContainer(MountableFile.forClasspathResource("seed.sql"), "/docker-entrypoint-initdb.d/seed.sql"); + + @DynamicPropertySource + static void mySQLProperties(DynamicPropertyRegistry registry) { + registry.add("spring.datasource.url", databaseContainer::getJdbcUrl); + registry.add("spring.datasource.username", databaseContainer::getUsername); + registry.add("spring.datasource.password", databaseContainer::getPassword); + registry.add("spring.datasource.db", databaseContainer::getDatabaseName); + } + + @Test + void shouldGetDashboardDrawers() { + Optional> result = subject.getDashboardDrawerRows(); + + Assertions.assertTrue(result.isPresent(), "Expected dashboard drawers to be present."); + } + + @Test + void shouldGetDashboardDrawersByDatasetId() { + int expectedDatasetId = 17; + Optional result = subject.getDashboardDrawerRowsByDatasetId(expectedDatasetId); + + Assertions.assertTrue(result.isPresent(), "Expected a DashboardDrawer to be present"); + Assertions.assertEquals(expectedDatasetId, result.get().datasetId(), "Expected the dataset id to be " + expectedDatasetId); + } +} diff --git a/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerServiceTest.java b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerServiceTest.java new file mode 100644 index 0000000..3d86c50 --- /dev/null +++ b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerServiceTest.java @@ -0,0 +1,84 @@ +package edu.harvard.dbmi.avillach.dictionary.dashboarddrawer; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.ActiveProfiles; + +import java.util.List; +import java.util.Optional; + +import static org.mockito.Mockito.*; + +@SpringBootTest +@ActiveProfiles("test") +class DashboardDrawerServiceTest { + + @Autowired + DashboardDrawerService service; + + @MockBean + DashboardDrawerRepository repository; + + @Test + void shouldFindAllDashboardDrawers() { + // Arrange: Mock the repository to return a sample dataset + when(repository.getDashboardDrawerRows()).thenReturn(Optional.of(List.of( + new DashboardDrawer(1, "Test Data Set 1", "TDS1", List.of("group1", "group2"), "Test Study for Unit / Integration Testing", List.of("Study Focus One", "Study Focus Two"), "Test Study Design", "Test Study Sponsor"), + new DashboardDrawer(2, "Test Data Set 2", "TDS2", List.of("group2"), "Test Study for Unit / Integration Testing", List.of("Study Focus One"), "Test Study Design", "Test Study Sponsor") + ))); + + // Act: Call the service method + Optional> result = service.findAll(); + + Assertions.assertTrue(result.isPresent()); + List dashboardDrawers = result.get(); + Assertions.assertEquals(2, dashboardDrawers.size()); + + DashboardDrawer firstDrawer = dashboardDrawers.getFirst(); + Assertions.assertEquals(1, firstDrawer.datasetId()); + Assertions.assertEquals("Test Data Set 1", firstDrawer.studyFullname()); + Assertions.assertEquals("TDS1", firstDrawer.studyAbbreviation()); + Assertions.assertEquals(List.of("group1", "group2"), firstDrawer.consentGroups()); + Assertions.assertEquals("Test Study for Unit / Integration Testing", firstDrawer.studySummary()); + Assertions.assertEquals(List.of("Study Focus One", "Study Focus Two"), firstDrawer.studyFocus()); + Assertions.assertEquals("Test Study Design", firstDrawer.studyDesign()); + Assertions.assertEquals("Test Study Sponsor", firstDrawer.sponsor()); + + DashboardDrawer secondDrawer = dashboardDrawers.get(1); + Assertions.assertEquals(2, secondDrawer.datasetId()); + Assertions.assertEquals("Test Data Set 2", secondDrawer.studyFullname()); + Assertions.assertEquals("TDS2", secondDrawer.studyAbbreviation()); + Assertions.assertEquals(List.of("group2"), secondDrawer.consentGroups()); + Assertions.assertEquals("Test Study for Unit / Integration Testing", firstDrawer.studySummary()); + Assertions.assertEquals(List.of("Study Focus One"), secondDrawer.studyFocus()); + Assertions.assertEquals("Test Study Design", secondDrawer.studyDesign()); + Assertions.assertEquals("Test Study Sponsor", secondDrawer.sponsor()); + } + + @Test + void shouldFindADashboardDrawerByDataasetId() { + // Arrange: Mock the repository to return a sample dataset + when(repository.getDashboardDrawerRowsByDatasetId(1)).thenReturn(Optional.of( + new DashboardDrawer(1, "Test Data Set 1", "TDS1", List.of("group1", "group2"), "Test Study for Unit / Integration Testing", List.of("Study Focus One", "Study Focus Two"), "Test Study Design", "Test Study Sponsor") + )); + + // Act: Call the service method + Optional result = service.findByDatasetId(1); + + Assertions.assertTrue(result.isPresent()); + DashboardDrawer drawer = result.get(); + + Assertions.assertEquals(1, drawer.datasetId()); + Assertions.assertEquals("Test Data Set 1", drawer.studyFullname()); + Assertions.assertEquals("TDS1", drawer.studyAbbreviation()); + Assertions.assertEquals(List.of("group1", "group2"), drawer.consentGroups()); + Assertions.assertEquals("Test Study for Unit / Integration Testing", drawer.studySummary()); + Assertions.assertEquals(List.of("Study Focus One", "Study Focus Two"), drawer.studyFocus()); + Assertions.assertEquals("Test Study Design", drawer.studyDesign()); + Assertions.assertEquals("Test Study Sponsor", drawer.sponsor()); + + } +} diff --git a/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerTest.java b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerTest.java new file mode 100644 index 0000000..211d05f --- /dev/null +++ b/src/test/java/edu/harvard/dbmi/avillach/dictionary/dashboarddrawer/DashboardDrawerTest.java @@ -0,0 +1,26 @@ +package edu.harvard.dbmi.avillach.dictionary.dashboarddrawer; + +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class DashboardDrawerTest { + + @Test + void testDashboardDrawerInstantiation() { + DashboardDrawer dashboardDrawer = new DashboardDrawer( + 1, "Full Name", "Abbr", List.of("Consent1", "Consent2"), "Summary", List.of("Focus1", "Focus2"), "Design", "Sponsor" + ); + + assertEquals(1, dashboardDrawer.datasetId()); + assertEquals("Full Name", dashboardDrawer.studyFullname()); + assertEquals("Abbr", dashboardDrawer.studyAbbreviation()); + assertEquals(List.of("Consent1", "Consent2"), dashboardDrawer.consentGroups()); + assertEquals("Summary", dashboardDrawer.studySummary()); + assertEquals(List.of("Focus1", "Focus2"), dashboardDrawer.studyFocus()); + assertEquals("Design", dashboardDrawer.studyDesign()); + assertEquals("Sponsor", dashboardDrawer.sponsor()); + } +}