assertEquals(new Interval<Integer>(2004, Double.POSITIVE_INFINITY, false, false, 3), intervalsResult.get(2));
}
@Test
public void testRemoveOverlapping2() {
DynamicInteger instance = new DynamicInteger();
instance = new DynamicInteger(instance, new Interval<Integer>(Double.NEGATIVE_INFINITY, 2002, 1));
instance = new DynamicInteger(instance, new Interval<Integer>(Double.NEGATIVE_INFINITY, 2003, 2));
instance = new DynamicInteger(instance, new Interval<Integer>(Double.NEGATIVE_INFINITY, 2004, 3));
DynamicInteger result = (DynamicInteger) DynamicUtilities.removeOverlapping(instance);
List<Interval<Integer>> intervalsResult = result.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
assertEquals(new Interval<Integer>(Double.NEGATIVE_INFINITY, 2002, false, false, 1), intervalsResult.get(0));
assertEquals(new Interval<Integer>(2002, 2003, true, false, 2), intervalsResult.get(1));
assertEquals(new Interval<Integer>(2003, 2004, true, false, 3), intervalsResult.get(2));
}