@Test
public void testHmacSha256Template() throws Exception {

  KeyTemplate template = HmacPrfKeyManager.hmacSha256Template();
  assertThat(template.getTypeUrl()).isEqualTo(new HmacPrfKeyManager().getKeyType());
  assertThat(template.getOutputPrefixType()).isEqualTo(KeyTemplate.OutputPrefixType.RAW);
  HmacPrfKeyFormat format =
      HmacPrfKeyFormat.parseFrom(template.getValue(), ExtensionRegistryLite.getEmptyRegistry());
  assertThat(format.getKeySize()).isEqualTo(32);
  assertThat(format.getParams().getHash()).isEqualTo(HashType.SHA256);
}