@Test
  public void testKeyTemplatesWork() throws Exception {
    Parameters p = AesGcmKeyManager.aes128GcmTemplate().toParameters();
    assertThat(KeysetHandle.generateNew(p).getAt(0).getKey().getParameters()).isEqualTo(p);

    p = AesGcmKeyManager.rawAes128GcmTemplate().toParameters();
    assertThat(KeysetHandle.generateNew(p).getAt(0).getKey().getParameters()).isEqualTo(p);

    p = AesGcmKeyManager.aes256GcmTemplate().toParameters();
    assertThat(KeysetHandle.generateNew(p).getAt(0).getKey().getParameters()).isEqualTo(p);

    p = AesGcmKeyManager.rawAes256GcmTemplate().toParameters();
    assertThat(KeysetHandle.generateNew(p).getAt(0).getKey().getParameters()).isEqualTo(p);
  }
Test for AesGcmJce and its key manager.
java_src/src/test/java/com/google/crypto/tink/aead/AesGcmKeyManagerTest.java