@Test
  public void legacyFullMacNotRegistered_fails() throws Exception {
    MutablePrimitiveRegistry.resetGlobalInstanceTestOnly();

    KeysetHandle keysetHandle =
        getKeysetHandleFromKeyNoSerialization(hmacImplementationTestVectors[0].key);

    assertThrows(GeneralSecurityException.class, () -> keysetHandle.getPrimitive(Mac.class));
  }
Verifies that LegacyFullMac is correctly integrated with the Tink ecosystem.
java_src/src/test/java/com/google/crypto/tink/mac/internal/LegacyFullMacIntegrationTest.java