ByteArrayWrapper { @Override public int hashCode() { return Arrays.hashCode(data); } ByteArrayWrapper(byte[] data); @Override boolean equals(Object other); @Override int hashCode();  }
@Test public void testHashCode() { byte[] a = new byte[] { 0x00, 0x01, 0x02 }; byte[] b = new byte[] { 0x00, 0x01, 0x02 }; ByteArrayWrapper wrapA = new ByteArrayWrapper(a); ByteArrayWrapper wrapB = new ByteArrayWrapper(b); assertEquals(wrapA.hashCode(), wrapB.hashCode()); }