@Override
  public int hashCode() {
    return value.hashCode();
  }
@Test
  public void testHashCode() {
    // Verify that the hashCode is equal when i==j, and usually not equal otherwise.
    int collisions = 0;
    for (int i = 0; i < TEST_KEYS.length; ++i) {
      int left = TEST_KEYS[i].hashCode();
      int leftClone = ByteKey.copyFrom(TEST_KEYS[i].getValue()).hashCode();
      assertEquals(
          String.format("Expected same hash code for %s and a copy of itself", TEST_KEYS[i]),
          left,
          leftClone);
      for (int j = i + 1; j < TEST_KEYS.length; ++j) {
        int right = TEST_KEYS[j].hashCode();
        if (left == right) {
          ++collisions;
        }
      }
    }
    int totalUnequalTests = TEST_KEYS.length * (TEST_KEYS.length - 1) / 2;
    assertThat("Too many hash collisions", collisions, lessThan(totalUnequalTests / 2));
  }