@Test
public void testHmacSha512Template() throws Exception {

  KeyTemplate template = HmacKeyManager.hmacSha512Template();
  assertThat(template.getTypeUrl()).isEqualTo(new HmacKeyManager().getKeyType());
  assertThat(template.getOutputPrefixType()).isEqualTo(KeyTemplate.OutputPrefixType.TINK);
  HmacKeyFormat format =
      HmacKeyFormat.parseFrom(template.getValue(), ExtensionRegistryLite.getEmptyRegistry());
  assertThat(format.getKeySize()).isEqualTo(64);
  assertThat(format.getParams().getTagSize()).isEqualTo(64);
  assertThat(format.getParams().getHash()).isEqualTo(HashType.SHA512);
}