@Deprecated
  public static void assertHmacKey(
      com.google.crypto.tink.KeyTemplate keyTemplate, Keyset.Key key) throws Exception {
    KeyTemplate protoTemplate = KeyTemplateProtoConverter.toProto(keyTemplate);

    assertThat(key.getKeyId()).isGreaterThan(0);
    assertThat(key.getStatus()).isEqualTo(KeyStatusType.ENABLED);
    assertThat(key.getOutputPrefixType()).isEqualTo(OutputPrefixType.TINK);
    assertThat(key.hasKeyData()).isTrue();
    assertThat(key.getKeyData().getTypeUrl()).isEqualTo(protoTemplate.getTypeUrl());

    HmacKeyFormat hmacKeyFormat =
        HmacKeyFormat.parseFrom(protoTemplate.getValue(), ExtensionRegistryLite.getEmptyRegistry());
    HmacKey hmacKey =
        HmacKey.parseFrom(key.getKeyData().getValue(), ExtensionRegistryLite.getEmptyRegistry());
    assertThat(hmacKey.getParams()).isEqualTo(hmacKeyFormat.getParams());
    assertThat(hmacKey.getKeyValue().size()).isEqualTo(hmacKeyFormat.getKeySize());
  }
Asserts that {@code key} is generated from {@code keyTemplate}.

@deprecated Do not use this function.
java_src/src/main/java/com/google/crypto/tink/testing/TestUtil.java