@Test
  @SuppressWarnings("deprecation") // This is a test that the deprecated function works.
  public void deprecatedFactoryGetPrimitive_whenWrapperHasNotBeenRegistered_works()
      throws Exception {
    // Only register EcdsaSignKeyManager, but not the Sign and Verify wrappers.
    EcdsaSignKeyManager.registerPair(/*newKeyAllowed=*/ true);
    KeysetHandle privateHandle = KeysetHandle.generateNew(KeyTemplates.get("ECDSA_P256"));
    KeysetHandle publicHandle = privateHandle.getPublicKeysetHandle();

    PublicKeySign signer = PublicKeySignFactory.getPrimitive(privateHandle);
    PublicKeyVerify verifier = PublicKeyVerifyFactory.getPrimitive(publicHandle);

    byte[] data = "data".getBytes(UTF_8);
    byte[] sig = signer.sign(data);
    verifier.verify(sig, data);
  }
Unit test for {@link PublicKeySignFactory} and {@link PublicKeyVerifyFactory}.

<p>The test case in this file needs {@link Registry} to not have PublicKeySignWrapper registered.
That's why it is in its own test file.
java_src/src/test/java/com/google/crypto/tink/signature/PublicKeySignVerifyFactoryWithoutWrapperRegisteredTest.java