@Test
  public void callingCreateTwiceGivesDifferentKeys() throws Exception {
    Parameters p = AesGcmKeyManager.aes128GcmTemplate().toParameters();
    Key key = KeysetHandle.generateNew(p).getAt(0).getKey();
    for (int i = 0; i < 1000; ++i) {
      assertThat(KeysetHandle.generateNew(p).getAt(0).getKey().equalsKey(key)).isFalse();
    }
  }
Test for AesGcmJce and its key manager.
java_src/src/test/java/com/google/crypto/tink/aead/AesGcmKeyManagerTest.java