@Test
  public void getPrimitive_differentHashType_works() throws Exception {
    HmacPrfParams params = HmacPrfParams.newBuilder().setHash(HashType.SHA512).build();
    HmacPrfKey key =
        HmacPrfKey.newBuilder()
            .setKeyValue(
                ByteString.copyFrom(
                    Hex.decode("abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd")))
            .setParams(params)
            .setVersion(0)
            .build();
    KeyData keyData =
        KeyData.newBuilder()
            .setKeyMaterialType(KeyMaterialType.SYMMETRIC)
            .setTypeUrl(TYPE_URL)
            .setValue(key.toByteString())
            .build();

    Prf prf = Registry.getPrimitive(keyData, Prf.class);

    assertThat(Hex.encode(prf.compute(Hex.decode("abcdefabcdefabcd"), 16)))
        .isEqualTo("70d7e00fa8365ac54d59f5d66c711cdf");
  }
Type url that this manager supports.
java_src/src/test/java/com/google/crypto/tink/prf/internal/LegacyHmacPrfTestKeyManagerTest.java