@Test
public void testBasicAesCtrHmacStreamingAead() throws Exception {

  byte[] keyValue = Random.randBytes(KDF_KEY_SIZE);
  int derivedKeySize = AES_KEY_SIZE;
  int ciphertextSegmentSize = 128;
  KeysetHandle keysetHandle =
      TestUtil.createKeysetHandle(
          TestUtil.createKeyset(
              TestUtil.createKey(
                  TestUtil.createAesCtrHmacStreamingKeyData(
                      keyValue, derivedKeySize, ciphertextSegmentSize),
                  42,
                  KeyStatusType.ENABLED,
                  OutputPrefixType.RAW)));
  StreamingAead streamingAead = StreamingAeadFactory.getPrimitive(keysetHandle);
  StreamingTestUtil.testEncryptionAndDecryption(streamingAead);
}