@Test
public void testEciesP256HkdfHmacSha256Aes128GcmTemplate() throws Exception {

  KeyTemplate template =
      EciesAeadHkdfPrivateKeyManager.eciesP256HkdfHmacSha256Aes128GcmTemplate();
  assertEquals(new EciesAeadHkdfPrivateKeyManager().getKeyType(), template.getTypeUrl());
  assertEquals(KeyTemplate.OutputPrefixType.TINK, template.getOutputPrefixType());
  EciesAeadHkdfKeyFormat format =
      EciesAeadHkdfKeyFormat.parseFrom(
          template.getValue(), ExtensionRegistryLite.getEmptyRegistry());
  assertThat(format.hasParams()).isTrue();
  assertThat(format.getParams().hasKemParams()).isTrue();
  assertThat(format.getParams().hasDemParams()).isTrue();
  assertThat(format.getParams().getDemParams().hasAeadDem()).isTrue();
  assertThat(format.getParams().getEcPointFormat()).isEqualTo(EcPointFormat.UNCOMPRESSED);
  EciesHkdfKemParams kemParams = format.getParams().getKemParams();
  assertThat(kemParams.getCurveType()).isEqualTo(EllipticCurveType.NIST_P256);
  assertThat(kemParams.getHkdfHashType()).isEqualTo(HashType.SHA256);
  assertThat(kemParams.getHkdfSalt()).isEmpty();
  assertThat(format.getParams().getDemParams().getAeadDem().toString())
      .isEqualTo(AeadKeyTemplates.AES128_GCM.toString());
}