@Test
public void testEquals() {

    Interval[] indices = new Interval[] { new Interval(1.0, 2.0), new Interval(3.0, 4.0), new Interval(2.0, 2.0), new Interval(
            2.0, 3.0) };
    String[] values = new String[] { "a", "z", "e" };
    IntervalStringMap set1 = new IntervalStringMap();
    IntervalStringMap set2 = new IntervalStringMap();
    IntervalStringMap set3 = new IntervalStringMap();
    IntervalStringMap set4 = new IntervalStringMap();
    IntervalStringMap set5 = new IntervalStringMap();
    set1.put(indices[0], values[0]);
    set1.put(indices[1], values[1]);
    set1.put(indices[2], values[2]);
    set2.put(indices[2], values[2]);
    set2.put(indices[1], values[1]);
    set2.put(indices[0], values[0]);
    set3.put(indices[0], "f");
    set3.put(indices[1], "o");
    set3.put(indices[2], "o");
    Assert.assertTrue(set1.equals(set2));
    Assert.assertTrue(set2.equals(set1));
    Assert.assertFalse(set1.equals(set3));
    Assert.assertFalse(set1.equals(set4));
    Assert.assertFalse(set1.equals(set5));
    Assert.assertTrue(set1.hashCode() == set2.hashCode());
    Assert.assertFalse(set1.hashCode() == set3.hashCode());
    Assert.assertFalse(set1.hashCode() == set4.hashCode());
}