Record { @Override public boolean equals(Object obj) { if(obj.getClass() == this.getClass()) { Record<L, K, V> other = (Record<L, K, V>) obj; return locator.equals(other.locator) && (partial ? key.equals(other.key) : true); } return false; } protected  Record(L locator, @Nullable K key); void append(Revision<L, K, V> revision); int cardinality(); @Override boolean equals(Object obj); long getVersion(); @Override int hashCode(); boolean isEmpty(); boolean isPartial(); @Override String toString();  }
@Test public void testNotEqualsNotPartial() { L l1 = getLocator(); L l2 = null; while (l2 == null || l1.equals(l2)) { l2 = getLocator(); } Assert.assertFalse(getRecord(l1).equals(getRecord(l2))); }
@Test public void testNotEqualsPartial() { L locator = getLocator(); K k1 = getKey(); K k2 = null; while (k2 == null || k1.equals(k2)) { k2 = getKey(); } Assert.assertFalse( getRecord(locator, k1).equals(getRecord(locator, k2))); }