@Test
  @SuppressWarnings("deprecation") // This is a test that the deprecated function works.
  public void deprecatedFactoryGetPrimitive_whenWrapperHasNotBeenRegistered_works()
      throws Exception {
    // Only register AesSivKeyManager, but not the DeterministicAeadWrapper.
    AesSivKeyManager.register(/* newKeyAllowed = */ true);
    KeysetHandle handle = KeysetHandle.generateNew(KeyTemplates.get("AES256_SIV"));

    DeterministicAead daead = DeterministicAeadFactory.getPrimitive(handle);

    byte[] plaintext = "plaintext".getBytes(UTF_8);
    byte[] associatedData = "associatedData".getBytes(UTF_8);
    byte[] ciphertext = daead.encryptDeterministically(plaintext, associatedData);
    assertThat(daead.decryptDeterministically(ciphertext, associatedData)).isEqualTo(plaintext);
  }
Unit test for {@link AeadFactory}.

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