/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
DefaultKeyedValue v1 = new DefaultKeyedValue("Test", new Double(45.5));
DefaultKeyedValue v2 = new DefaultKeyedValue("Test", new Double(45.5));
assertTrue(v1.equals(v2));
assertTrue(v2.equals(v1));
v1 = new DefaultKeyedValue("Test 1", new Double(45.5));
v2 = new DefaultKeyedValue("Test 2", new Double(45.5));
assertFalse(v1.equals(v2));
v1 = new DefaultKeyedValue("Test", new Double(45.5));
v2 = new DefaultKeyedValue("Test", new Double(45.6));
assertFalse(v1.equals(v2));
}