@Theory
  public void endToEnd_works(@FromDataPoints("hmacPrfTestVectors") HmacLegacyPrfTestVector t)
      throws Exception {
    MutablePrimitiveRegistry.resetGlobalInstanceTestOnly();
    MutablePrimitiveRegistry.globalInstance()
        .registerPrimitiveConstructor(
            PrimitiveConstructor.create(LegacyFullPrf::create, LegacyProtoKey.class, Prf.class));
    TestLegacyPrfWrapper.register();

    KeysetHandle keysetHandle = getKeysetHandleFromKeyNoSerialization(t.key);
    PrfSet prfSet = keysetHandle.getPrimitive(PrfSet.class);
    Prf prf = prfSet.getPrfs().get(prfSet.getPrimaryId());

    assertThat(prf).isInstanceOf(LegacyFullPrf.class);
    assertThat(prf.compute(t.message, t.tag.length)).isEqualTo(t.tag);
  }
Verifies that LegacyFullPrf is correctly integrated with the Tink ecosystem.
java_src/src/test/java/com/google/crypto/tink/prf/internal/LegacyFullPrfIntegrationTest.java