BlobKey implements Serializable, Comparable<BlobKey> { @Override public boolean equals(final Object obj) { if (!(obj instanceof BlobKey)) { return false; } final BlobKey bk = (BlobKey) obj; return Arrays.equals(this.key, bk.key); } BlobKey();   BlobKey(byte[] key); void addToMessageDigest(MessageDigest md); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); @Override int compareTo(BlobKey o);  }
@Test public void testEquals() { final BlobKey k1 = new BlobKey(KEY_ARRAY_1); final BlobKey k2 = new BlobKey(KEY_ARRAY_1); final BlobKey k3 = new BlobKey(KEY_ARRAY_2); assertTrue(k1.equals(k2)); assertFalse(k1.equals(k3)); }