OCompositeKey implements Comparable<OCompositeKey>, Serializable { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final OCompositeKey that = (OCompositeKey) o; return keys.equals(that.keys); } OCompositeKey(final List<?> keys);  OCompositeKey(final Object... keys);  OCompositeKey(); List<Object> getKeys(); void addKey(final Object key); int compareTo(final OCompositeKey otherKey); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testEqualNull() { final OCompositeKey compositeKey = new OCompositeKey(); assertFalse(compositeKey.equals(null)); }
@Test public void testEqualSame() { final OCompositeKey compositeKey = new OCompositeKey(); assertTrue(compositeKey.equals(compositeKey)); }
@Test public void testEqualDiffClass() { final OCompositeKey compositeKey = new OCompositeKey(); assertFalse(compositeKey.equals("1")); }