@Test
  public void createKeyTemplateWithEnvelopeKeyTemplateAsDekTemplate_fails() throws Exception {
    String kekUri = FakeKmsClient.createFakeKeyUri();

    KeyTemplate dekTemplate =
        KmsEnvelopeAeadKeyManager.createKeyTemplate(
            kekUri, AesCtrHmacAeadKeyManager.aes128CtrHmacSha256Template());
    assertThrows(
        IllegalArgumentException.class,
        () -> KmsEnvelopeAeadKeyManager.createKeyTemplate(kekUri, dekTemplate));
  }
Tests for {@code KmsEnvelopeAead} and {@code KmsEnvelopeAeadKeyManager}.
java_src/src/test/java/com/google/crypto/tink/aead/KmsEnvelopeAeadKeyManagerTest.java