@Test
public void createKey_multipleCallsCreateDifferentKeys() throws Exception {

  TreeSet<String> keys = new TreeSet<>();
  KeyTypeManager.KeyFactory<ChaCha20Poly1305KeyFormat, ChaCha20Poly1305Key> factory =
      new ChaCha20Poly1305KeyManager().keyFactory();
  final int numKeys = 1000;
  for (int i = 0; i < numKeys; ++i) {
    keys.add(
        TestUtil.hexEncode(
            factory.createKey(ChaCha20Poly1305KeyFormat.getDefaultInstance()).toByteArray()));
  }
  assertThat(keys).hasSize(numKeys);
}