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

    StreamingAead streamingAead = StreamingAeadFactory.getPrimitive(handle);

    StreamingTestUtil.testEncryptionAndDecryption(streamingAead);
  }
Unit test for {@link StreamingAeadFactory}.

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