@Test
public void testEquals() {

    IntervalSet set1 = new IntervalSet();
    set1.add(new Interval(6.0, 7.0));
    set1.add(new Interval(1.0, 2.0));
    IntervalSet set2 = new IntervalSet();
    set2.add(new Interval(6.0, 7.0));
    set2.add(new Interval(1.0, 2.0));
    IntervalSet set3 = new IntervalSet();
    set3.add(new Interval(6.0, 7.0));
    set3.add(new Interval(2.0, 3.0));
    Assert.assertTrue(set1.equals(set2));
    Assert.assertTrue(set2.equals(set1));
    Assert.assertFalse(set1.equals(set3));
    Assert.assertFalse(set3.equals(set1));
    Assert.assertTrue(set1.hashCode() == set2.hashCode());
    Assert.assertFalse(set1.hashCode() == set3.hashCode());
}