@Test
public void testGetOverlappingTimestamps() {

    TimestampIntegerMap i = new TimestampIntegerMap();
    i.put(2001.0, 42);
    Assert.assertEquals(i.getOverlappingTimestamps(2001, 2002), new int[] { 0 });
    Assert.assertEquals(i.getOverlappingTimestamps(2000, 2001), new int[] { 0 });
    Assert.assertEquals(i.getOverlappingTimestamps(2000, Double.POSITIVE_INFINITY), new int[] { 0 });
    TimestampIntegerMap j = new TimestampIntegerMap();
    j.put(2001.0, 42);
    j.put(2002.0, 42);
    j.put(2004.0, 42);
    j.put(2005.0, 42);
    Assert.assertEquals(j.getOverlappingTimestamps(1998, 1999), new int[] {});
    Assert.assertEquals(j.getOverlappingTimestamps(1998, 2001), new int[] { 0 });
    Assert.assertEquals(j.getOverlappingTimestamps(1998, 2001.5), new int[] { 0 });
    Assert.assertEquals(j.getOverlappingTimestamps(1998, 2002), new int[] { 0, 1 });
    Assert.assertEquals(j.getOverlappingTimestamps(2001, 2001), new int[] { 0 });
    Assert.assertEquals(j.getOverlappingTimestamps(2001, 2002), new int[] { 0, 1 });
    Assert.assertEquals(j.getOverlappingTimestamps(2003, 2005), new int[] { 2, 3 });
    Assert.assertEquals(j.getOverlappingTimestamps(2005, 2005), new int[] { 3 });
    Assert.assertEquals(j.getOverlappingTimestamps(2005, 2016), new int[] { 3 });
    Assert.assertEquals(j.getOverlappingTimestamps(2006, 2007), new int[] {});
}