public static <K> StructuralKey<K> of(K key, Coder<K> coder) {
    try {
      return new CoderStructuralKey<>(coder, key);
    } catch (Exception e) {
      throw new IllegalArgumentException(
          "Could not encode a key with its provided coder " + coder.getClass().getSimpleName(), e);
    }
  }
@Test
  public void notEqualEncodingsEqual() {
    byte[] original = new byte[] {1, 4, 9, 127, -22};
    StructuralKey<byte[]> key = StructuralKey.of(original, ByteArrayCoder.of());

    StructuralKey<byte[]> otherKey =
        StructuralKey.of(new byte[] {9, -128, 22}, ByteArrayCoder.of());
    assertThat(key, Matchers.not(Matchers.equalTo(otherKey)));
  }