@Test
  public void testGetPublicKeyData_shouldThrow() throws Exception {
    KeyData keyData =
        Registry.newKeyData(
            com.google.crypto.tink.proto.KeyTemplate.parseFrom(
                TinkProtoParametersFormat.serialize(PredefinedMacParameters.HMAC_SHA256_128BITTAG),
                ExtensionRegistryLite.getEmptyRegistry()));
    GeneralSecurityException e =
        assertThrows(
            GeneralSecurityException.class,
            () -> Registry.getPublicKeyData(keyData.getTypeUrl(), keyData.getValue()));
    assertThat(e.toString()).contains("not a PrivateKeyManager");
  }
Returns the type URL that identifies the key type of keys managed by this KeyManager.
java_src/src/test/java/com/google/crypto/tink/RegistryTest.java