public static <K> ShardedKey<K> of(K key, byte[] shardId) {
    checkArgument(key != null, "Key should not be null!");
    checkArgument(shardId != null, "Shard id should not be null!");
    return new ShardedKey<K>(key, shardId);
  }
@Test
  public void testEquality() {
    assertEquals(ShardedKey.of("key", new byte[0]), ShardedKey.of("key", new byte[0]));
    assertEquals(
        ShardedKey.of("key", "shard_id".getBytes(UTF_8)),
        ShardedKey.of("key", "shard_id".getBytes(UTF_8)));
  }