From 990b625bb33252180ebee7029fc1d81237f002ad Mon Sep 17 00:00:00 2001 From: Greg Akins Date: Wed, 27 Sep 2023 14:30:44 -0400 Subject: [PATCH 1/5] MAT-6058: Adding mongock script to update QDM measure stratification assoctions --- .../UpdateStratificationAssociation.java | 62 +++++++++++++++++++ .../repositories/MeasureRepository.java | 3 + 2 files changed, 65 insertions(+) create mode 100644 src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java diff --git a/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java new file mode 100644 index 000000000..26643134d --- /dev/null +++ b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java @@ -0,0 +1,62 @@ +package cms.gov.madie.measure.config; + +import java.util.List; + +import org.apache.commons.collections4.CollectionUtils; + +import cms.gov.madie.measure.repositories.MeasureRepository; +import gov.cms.madie.models.measure.Group; +import gov.cms.madie.models.measure.Measure; +import gov.cms.madie.models.measure.Stratification; +import io.mongock.api.annotations.ChangeUnit; +import io.mongock.api.annotations.Execution; +import io.mongock.api.annotations.RollbackExecution; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; + +@ChangeUnit(id = "update_stratification-assocation", order = "1", author = "madie_dev") +@Slf4j +public class UpdateStratificationAssociation { + + @Setter private List tempMeasures; + + @Execution + public void removeAssociationFromStratification(MeasureRepository measureRepository) { + List measures = measureRepository.findAllByModel("QDM v5.6"); + if (CollectionUtils.isNotEmpty(measures)) { + setTempMeasures(measures); + measures.forEach( + measure -> { + if ("QDM v5.6".equals(measure.getModel())) { + List groups = measure.getGroups(); + if (CollectionUtils.isNotEmpty(groups)) { + groups.forEach( + group -> { + List strats = group.getStratifications(); + if (CollectionUtils.isNotEmpty((strats))) { + strats.forEach( + strat -> { + log.info("Stratification...", strat); + strat.setAssociation(null); + }); + } + group.setStratifications(strats); + }); + measure.setGroups(groups); + measureRepository.save(measure); + } + } + }); + } + } + + @RollbackExecution + public void rollbackExecution(MeasureRepository measureRepository) { + if (CollectionUtils.isNotEmpty(tempMeasures)) { + tempMeasures.forEach( + measure -> { + measureRepository.save(measure); + }); + } + } +} diff --git a/src/main/java/cms/gov/madie/measure/repositories/MeasureRepository.java b/src/main/java/cms/gov/madie/measure/repositories/MeasureRepository.java index f712815ae..040e387a2 100644 --- a/src/main/java/cms/gov/madie/measure/repositories/MeasureRepository.java +++ b/src/main/java/cms/gov/madie/measure/repositories/MeasureRepository.java @@ -48,9 +48,12 @@ public interface MeasureRepository boolean existsByMeasureSetIdAndActiveAndMeasureMetaDataDraft( String setId, boolean active, boolean draft); + // Map measureSetId, boolean (ie., // id 1 - drafted , 2 - versioned setId 4 4, false // id 1 - versioned , 2 - versioned setId 4 4, true List findAllByMeasureSetIdInAndActiveAndMeasureMetaDataDraft( List setIds, boolean active, boolean draft); + + List findAllByModel(String model); } From eb032dc4ce9b2cbf1d7b23e6da1c86df6ce2cbbd Mon Sep 17 00:00:00 2001 From: Greg Akins Date: Thu, 28 Sep 2023 06:16:11 -0400 Subject: [PATCH 2/5] MAT-6058: Adding JUnit tests for change unit --- .../UpdateStratificationAssociation.java | 3 +- .../UpdateStratificationAssociationTest.java | 79 +++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java diff --git a/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java index 26643134d..cd87679cb 100644 --- a/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java +++ b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java @@ -5,6 +5,7 @@ import org.apache.commons.collections4.CollectionUtils; import cms.gov.madie.measure.repositories.MeasureRepository; +import gov.cms.madie.models.common.ModelType; import gov.cms.madie.models.measure.Group; import gov.cms.madie.models.measure.Measure; import gov.cms.madie.models.measure.Stratification; @@ -22,7 +23,7 @@ public class UpdateStratificationAssociation { @Execution public void removeAssociationFromStratification(MeasureRepository measureRepository) { - List measures = measureRepository.findAllByModel("QDM v5.6"); + List measures = measureRepository.findAllByModel(ModelType.QDM_5_6.getValue()); if (CollectionUtils.isNotEmpty(measures)) { setTempMeasures(measures); measures.forEach( diff --git a/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java new file mode 100644 index 000000000..19a69e5c8 --- /dev/null +++ b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java @@ -0,0 +1,79 @@ +package cms.gov.madie.measure.config; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import org.apache.commons.collections4.CollectionUtils; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.test.util.ReflectionTestUtils; + +import cms.gov.madie.measure.repositories.MeasureRepository; +import gov.cms.madie.models.common.ModelType; +import gov.cms.madie.models.measure.Group; +import gov.cms.madie.models.measure.Measure; +import gov.cms.madie.models.measure.PopulationType; +import gov.cms.madie.models.measure.Stratification; +import gov.cms.madie.models.measure.TestCase; + +@ExtendWith(MockitoExtension.class) +public class UpdateStratificationAssociationTest { + + @Mock private MeasureRepository measureRepository; + @Mock private Measure measure; + @InjectMocks private UpdateStratificationAssociation updateStratificationAssociation; + + private Measure testMeasure; + + private List testGroups; + + @BeforeEach + public void setUp() { + Stratification stratification = new Stratification() ; + stratification.setAssociation(PopulationType.INITIAL_POPULATION); + List groups = List.of(Group.builder().stratifications(List.of(stratification)).build()); + testMeasure = Measure.builder().id("testMeasureId").model(ModelType.QDM_5_6.getValue()).groups(groups).build(); + } + + @Test + public void addPatientIdChangeUnitSuccess() { + doReturn(List.of(testMeasure)).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + updateStratificationAssociation.removeAssociationFromStratification(measureRepository); + + Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); + assertNotNull(strat); + + assertNull(strat.getAssociation()); + + } + + + + @Test + public void testRollbackExecutionHasMeasures() { + ReflectionTestUtils.setField(updateStratificationAssociation, "tempMeasures", List.of(testMeasure)); + + updateStratificationAssociation.rollbackExecution(measureRepository); + + Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); + assertNotNull(strat); + + assertEquals(PopulationType.INITIAL_POPULATION, strat.getAssociation()); + } + +} From 4cc0917cb9bbc64149d9415c183f66aaa679c741 Mon Sep 17 00:00:00 2001 From: Greg Akins Date: Thu, 28 Sep 2023 06:32:36 -0400 Subject: [PATCH 3/5] MAT-6058: Cleaning up imports --- .../config/UpdateStratificationAssociationTest.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java index 19a69e5c8..ef231e448 100644 --- a/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java +++ b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java @@ -3,21 +3,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import java.util.ArrayList; import java.util.List; -import java.util.UUID; -import org.apache.commons.collections4.CollectionUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.ArgumentCaptor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; @@ -29,7 +21,6 @@ import gov.cms.madie.models.measure.Measure; import gov.cms.madie.models.measure.PopulationType; import gov.cms.madie.models.measure.Stratification; -import gov.cms.madie.models.measure.TestCase; @ExtendWith(MockitoExtension.class) public class UpdateStratificationAssociationTest { From baf76c20a868ea64f9dfc7b9b2f5343037f86c30 Mon Sep 17 00:00:00 2001 From: Greg Akins Date: Thu, 28 Sep 2023 06:56:17 -0400 Subject: [PATCH 4/5] MAT-6058: Adding better test coverage --- .../UpdateStratificationAssociation.java | 73 +++++++++---------- .../UpdateStratificationAssociationTest.java | 57 ++++++++++++++- 2 files changed, 90 insertions(+), 40 deletions(-) diff --git a/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java index cd87679cb..68a460860 100644 --- a/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java +++ b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java @@ -19,45 +19,40 @@ @Slf4j public class UpdateStratificationAssociation { - @Setter private List tempMeasures; + @Setter + private List tempMeasures; - @Execution - public void removeAssociationFromStratification(MeasureRepository measureRepository) { - List measures = measureRepository.findAllByModel(ModelType.QDM_5_6.getValue()); - if (CollectionUtils.isNotEmpty(measures)) { - setTempMeasures(measures); - measures.forEach( - measure -> { - if ("QDM v5.6".equals(measure.getModel())) { - List groups = measure.getGroups(); - if (CollectionUtils.isNotEmpty(groups)) { - groups.forEach( - group -> { - List strats = group.getStratifications(); - if (CollectionUtils.isNotEmpty((strats))) { - strats.forEach( - strat -> { - log.info("Stratification...", strat); - strat.setAssociation(null); - }); - } - group.setStratifications(strats); - }); - measure.setGroups(groups); - measureRepository.save(measure); - } - } - }); - } - } + @Execution + public void removeAssociationFromStratification(MeasureRepository measureRepository) { + List measures = measureRepository.findAllByModel(ModelType.QDM_5_6.getValue()); + if (CollectionUtils.isNotEmpty(measures)) { + setTempMeasures(measures); + measures.forEach(measure -> { + List groups = measure.getGroups(); + if (CollectionUtils.isNotEmpty(groups)) { + groups.forEach(group -> { + List strats = group.getStratifications(); + if (CollectionUtils.isNotEmpty((strats))) { + strats.forEach(strat -> { + log.info("Stratification...", strat); + strat.setAssociation(null); + }); + } + group.setStratifications(strats); + }); + measure.setGroups(groups); + measureRepository.save(measure); + } + }); + } + } - @RollbackExecution - public void rollbackExecution(MeasureRepository measureRepository) { - if (CollectionUtils.isNotEmpty(tempMeasures)) { - tempMeasures.forEach( - measure -> { - measureRepository.save(measure); - }); - } - } + @RollbackExecution + public void rollbackExecution(MeasureRepository measureRepository) { + if (CollectionUtils.isNotEmpty(tempMeasures)) { + tempMeasures.forEach(measure -> { + measureRepository.save(measure); + }); + } + } } diff --git a/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java index ef231e448..b2cd02109 100644 --- a/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java +++ b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java @@ -1,12 +1,20 @@ package cms.gov.madie.measure.config; +import static org.assertj.core.api.Assertions.assertThat; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.lessThan; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.doReturn; +import java.util.ArrayList; import java.util.List; +import org.apache.commons.collections4.CollectionUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -42,7 +50,7 @@ public void setUp() { } @Test - public void addPatientIdChangeUnitSuccess() { + public void updateStratificationAssociation() { doReturn(List.of(testMeasure)).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); updateStratificationAssociation.removeAssociationFromStratification(measureRepository); @@ -52,6 +60,41 @@ public void addPatientIdChangeUnitSuccess() { assertNull(strat.getAssociation()); } + + @Test + public void updateStratificationAssociationWithoutGroups() { + testMeasure.setGroups(new ArrayList()); + doReturn(List.of(testMeasure)).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + updateStratificationAssociation.removeAssociationFromStratification(measureRepository); + + List groups= testMeasure.getGroups(); + assertTrue(CollectionUtils.isEmpty(groups)); + + } + + @Test + public void updateStratificationAssociationWithoutStratifications() { + testMeasure.getGroups().get(0).setStratifications(new ArrayList()); + doReturn(List.of(testMeasure)).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + updateStratificationAssociation.removeAssociationFromStratification(measureRepository); + + List strats= testMeasure.getGroups().get(0).getStratifications(); + assertTrue(CollectionUtils.isEmpty(strats)); + + } + + @Test + public void updateStratificationAssociation_ModelMismatch() { + + doReturn(new ArrayList()).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + updateStratificationAssociation.removeAssociationFromStratification(measureRepository); + + Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); + assertNotNull(strat); + + assertEquals(PopulationType.INITIAL_POPULATION, strat.getAssociation()); + + } @@ -66,5 +109,17 @@ public void testRollbackExecutionHasMeasures() { assertEquals(PopulationType.INITIAL_POPULATION, strat.getAssociation()); } + + @Test + public void testRollbackExecutionNoMeasures() { + ReflectionTestUtils.setField(updateStratificationAssociation, "tempMeasures", new ArrayList()); + + updateStratificationAssociation.rollbackExecution(measureRepository); + + Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); + assertNotNull(strat); + + assertEquals(PopulationType.INITIAL_POPULATION, strat.getAssociation()); + } } From 0ce40d7b630e194c503ce0542865f90db11792bc Mon Sep 17 00:00:00 2001 From: Greg Akins Date: Thu, 28 Sep 2023 07:07:23 -0400 Subject: [PATCH 5/5] MAT-6058: Cleaning up imports again --- .../UpdateStratificationAssociation.java | 71 ++++++++++--------- .../UpdateStratificationAssociationTest.java | 66 ++++++++--------- 2 files changed, 71 insertions(+), 66 deletions(-) diff --git a/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java index 68a460860..3d10d0e7f 100644 --- a/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java +++ b/src/main/java/cms/gov/madie/measure/config/UpdateStratificationAssociation.java @@ -19,40 +19,43 @@ @Slf4j public class UpdateStratificationAssociation { - @Setter - private List tempMeasures; + @Setter private List tempMeasures; - @Execution - public void removeAssociationFromStratification(MeasureRepository measureRepository) { - List measures = measureRepository.findAllByModel(ModelType.QDM_5_6.getValue()); - if (CollectionUtils.isNotEmpty(measures)) { - setTempMeasures(measures); - measures.forEach(measure -> { - List groups = measure.getGroups(); - if (CollectionUtils.isNotEmpty(groups)) { - groups.forEach(group -> { - List strats = group.getStratifications(); - if (CollectionUtils.isNotEmpty((strats))) { - strats.forEach(strat -> { - log.info("Stratification...", strat); - strat.setAssociation(null); - }); - } - group.setStratifications(strats); - }); - measure.setGroups(groups); - measureRepository.save(measure); - } - }); - } - } + @Execution + public void removeAssociationFromStratification(MeasureRepository measureRepository) { + List measures = measureRepository.findAllByModel(ModelType.QDM_5_6.getValue()); + if (CollectionUtils.isNotEmpty(measures)) { + setTempMeasures(measures); + measures.forEach( + measure -> { + List groups = measure.getGroups(); + if (CollectionUtils.isNotEmpty(groups)) { + groups.forEach( + group -> { + List strats = group.getStratifications(); + if (CollectionUtils.isNotEmpty((strats))) { + strats.forEach( + strat -> { + log.info("Stratification...", strat); + strat.setAssociation(null); + }); + } + group.setStratifications(strats); + }); + measure.setGroups(groups); + measureRepository.save(measure); + } + }); + } + } - @RollbackExecution - public void rollbackExecution(MeasureRepository measureRepository) { - if (CollectionUtils.isNotEmpty(tempMeasures)) { - tempMeasures.forEach(measure -> { - measureRepository.save(measure); - }); - } - } + @RollbackExecution + public void rollbackExecution(MeasureRepository measureRepository) { + if (CollectionUtils.isNotEmpty(tempMeasures)) { + tempMeasures.forEach( + measure -> { + measureRepository.save(measure); + }); + } + } } diff --git a/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java index b2cd02109..fa7e2dc5a 100644 --- a/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java +++ b/src/test/java/cms/gov/madie/measure/config/UpdateStratificationAssociationTest.java @@ -1,10 +1,5 @@ package cms.gov.madie.measure.config; -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.lessThan; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; @@ -43,73 +38,81 @@ public class UpdateStratificationAssociationTest { @BeforeEach public void setUp() { - Stratification stratification = new Stratification() ; + Stratification stratification = new Stratification(); stratification.setAssociation(PopulationType.INITIAL_POPULATION); List groups = List.of(Group.builder().stratifications(List.of(stratification)).build()); - testMeasure = Measure.builder().id("testMeasureId").model(ModelType.QDM_5_6.getValue()).groups(groups).build(); + testMeasure = + Measure.builder() + .id("testMeasureId") + .model(ModelType.QDM_5_6.getValue()) + .groups(groups) + .build(); } @Test public void updateStratificationAssociation() { - doReturn(List.of(testMeasure)).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + doReturn(List.of(testMeasure)) + .when(measureRepository) + .findAllByModel(ModelType.QDM_5_6.getValue()); updateStratificationAssociation.removeAssociationFromStratification(measureRepository); Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); assertNotNull(strat); - + assertNull(strat.getAssociation()); - } - + @Test public void updateStratificationAssociationWithoutGroups() { - testMeasure.setGroups(new ArrayList()); - doReturn(List.of(testMeasure)).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + testMeasure.setGroups(new ArrayList()); + doReturn(List.of(testMeasure)) + .when(measureRepository) + .findAllByModel(ModelType.QDM_5_6.getValue()); updateStratificationAssociation.removeAssociationFromStratification(measureRepository); - List groups= testMeasure.getGroups(); + List groups = testMeasure.getGroups(); assertTrue(CollectionUtils.isEmpty(groups)); - } - + @Test public void updateStratificationAssociationWithoutStratifications() { - testMeasure.getGroups().get(0).setStratifications(new ArrayList()); - doReturn(List.of(testMeasure)).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + testMeasure.getGroups().get(0).setStratifications(new ArrayList()); + doReturn(List.of(testMeasure)) + .when(measureRepository) + .findAllByModel(ModelType.QDM_5_6.getValue()); updateStratificationAssociation.removeAssociationFromStratification(measureRepository); - List strats= testMeasure.getGroups().get(0).getStratifications(); + List strats = testMeasure.getGroups().get(0).getStratifications(); assertTrue(CollectionUtils.isEmpty(strats)); - } - + @Test public void updateStratificationAssociation_ModelMismatch() { - - doReturn(new ArrayList()).when(measureRepository).findAllByModel(ModelType.QDM_5_6.getValue()); + + doReturn(new ArrayList()) + .when(measureRepository) + .findAllByModel(ModelType.QDM_5_6.getValue()); updateStratificationAssociation.removeAssociationFromStratification(measureRepository); Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); assertNotNull(strat); - + assertEquals(PopulationType.INITIAL_POPULATION, strat.getAssociation()); - } - - @Test public void testRollbackExecutionHasMeasures() { - ReflectionTestUtils.setField(updateStratificationAssociation, "tempMeasures", List.of(testMeasure)); + ReflectionTestUtils.setField( + updateStratificationAssociation, "tempMeasures", List.of(testMeasure)); updateStratificationAssociation.rollbackExecution(measureRepository); Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); assertNotNull(strat); - + assertEquals(PopulationType.INITIAL_POPULATION, strat.getAssociation()); } - + @Test public void testRollbackExecutionNoMeasures() { ReflectionTestUtils.setField(updateStratificationAssociation, "tempMeasures", new ArrayList()); @@ -118,8 +121,7 @@ public void testRollbackExecutionNoMeasures() { Stratification strat = testMeasure.getGroups().get(0).getStratifications().get(0); assertNotNull(strat); - + assertEquals(PopulationType.INITIAL_POPULATION, strat.getAssociation()); } - }