when(plan1.getOverallResults()).thenReturn(plan1ResultNode);
when(plan1.getWinningAlternative()).thenReturn("alternative3");
plans.add(plan1);
// Measures
Measure m1 = mock(Measure.class);
when(m1.getUri()).thenReturn("http://measure1");
// Leaves
// Leaf1
VPlanLeaf leaf1 = mock(VPlanLeaf.class);
when(leaf1.isMapped()).thenReturn(true);
when(leaf1.getPlanId()).thenReturn(1);
when(leaf1.getMeasure()).thenReturn(m1);
when(leaf1.hasKOPotential()).thenReturn(false);
when(leaf1.getPotentialMinimum()).thenReturn(1d);
when(leaf1.getPotentialMaximum()).thenReturn(4d);
when(leaf1.getTotalWeight()).thenReturn(0.1d);
Map<String, Double> leaf1Results = new HashMap<String, Double>();
leaf1Results.put("alternative1", 1d);
leaf1Results.put("alternative2", 2d);
leaf1Results.put("alternative3", 3d);
when(leaf1.getAlternativeResultsAsMap()).thenReturn(leaf1Results);
List<VPlanLeaf> leaves = new ArrayList<VPlanLeaf>();
leaves.add(leaf1);
leaves.add(leaf1);
leaves.add(leaf1);
DominatedSets c = new RankChangingDominatedSets(plans, leaves);
List<List<String>> rangeChangingSets = c.getDominatedSets(Aggregation.ALL);
// Assert
assertEquals(rangeChangingSets.size(), 1);
List<String> set1 = rangeChangingSets.get(0);
assertEquals(set1.size(), 1);
assertTrue(set1.contains(m1.getUri()));
}