@Test
  public void testBuilder_copyKeyset_works() throws Exception {
    KeysetHandle original =
        KeysetHandle.newBuilder()
            .addEntry(KeysetHandle.generateEntryFromParametersName("AES256_CMAC").withFixedId(777))
            .addEntry(
                KeysetHandle.generateEntryFromParametersName("AES256_CMAC")
                    .makePrimary()
                    .withFixedId(778))
            .build();
    KeysetHandle copy = KeysetHandle.newBuilder(original).build();
    assertThat(copy.size()).isEqualTo(2);
    assertThat(copy.getAt(0).getId()).isEqualTo(777);
    assertThat(copy.getAt(0).getKey().equalsKey(original.getAt(0).getKey())).isTrue();
    assertThat(copy.getAt(0).getStatus()).isEqualTo(original.getAt(0).getStatus());
    assertThat(copy.getAt(1).getId()).isEqualTo(778);
    assertThat(copy.getAt(1).getKey().equalsKey(original.getAt(1).getKey())).isTrue();
    assertThat(copy.getAt(1).getStatus()).isEqualTo(original.getAt(1).getStatus());
  }
Tests that key parsing via the serialization registry works as expected.

<p>NOTE: This adds a parser to the MutableSerializationRegistry, which no other test uses.
java_src/src/test/java/com/google/crypto/tink/KeysetHandleTest.java