### Question:
DefaultKeyedValue implements KeyedValue, Cloneable,
        PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultKeyedValue)) { return false; } DefaultKeyedValue that = (DefaultKeyedValue) obj; if (!this.key.equals(that.key)) { return false; } if (this.value != null ? !this.value.equals(that.value) : that.value != null) { return false; } return true; } DefaultKeyedValue(Comparable key, Number value); @Override Comparable getKey(); @Override Number getValue(); synchronized void setValue(Number value); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); @Override String toString();  }### Answer:
@Test public void testEquals() { DefaultKeyedValue v1 = new DefaultKeyedValue("Test", 45.5); DefaultKeyedValue v2 = new DefaultKeyedValue("Test", 45.5); assertEquals(v1, v2); assertEquals(v2, v1); v1 = new DefaultKeyedValue("Test 1", 45.5); v2 = new DefaultKeyedValue("Test 2", 45.5); assertFalse(v1.equals(v2)); v1 = new DefaultKeyedValue("Test", 45.5); v2 = new DefaultKeyedValue("Test", 45.6); assertFalse(v1.equals(v2)); }