### Question:
RawKey implements Key<T> { @Override public int hashCode() { return Arrays.hashCode(key); } RawKey(byte[] key); @Override byte[] toBytes(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Key otherKey);  }### Answer:
@Test public void testHashCodeReturnsDifferentValuesWhenKeysAreNotEqual() { final Key<Entity> a = new RawKey<>("hello".getBytes()); final Key<Entity> b = new RawKey<>("world".getBytes()); assertNotEquals(a.hashCode(), b.hashCode()); }
@Test public void testHashCodeReturnsEqualValuesWhenKeysAreEqual() { final Key<Entity> a = new RawKey<>("goodbye".getBytes()); final Key<Entity> b = new RawKey<>("goodbye".getBytes()); assertEquals(a.hashCode(), b.hashCode()); }