@Test
public void testEquals() {

    double[] indices = new double[] { 1.0, 2.0, 6.0, 7.0 };
    String[] values = new String[] { "a", "z", "e" };
    TimestampStringMap set1 = new TimestampStringMap();
    TimestampStringMap set2 = new TimestampStringMap();
    TimestampStringMap set3 = new TimestampStringMap();
    TimestampStringMap set4 = new TimestampStringMap();
    TimestampStringMap set5 = new TimestampStringMap();
    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");
    set4.put(7.0, values[0]);
    set4.put(8.0, values[1]);
    set4.put(9.0, values[2]);
    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());
}