public static AesCmacKey createAesCmacKey(
      String keyMaterial, AesCmacParameters parameters, @Nullable Integer idRequirement) {
    try {
      return AesCmacKey.builder()
          .setAesKeyBytes(
              SecretBytes.copyFrom(Hex.decode(keyMaterial), InsecureSecretKeyAccess.get()))
          .setParameters(parameters)
          .setIdRequirement(idRequirement)
          .build();
    } catch (GeneralSecurityException ex) {
      throw new TinkBugException(ex);
    }
  }
Creates an {@link AesCmacKey} from the provided {@code keyMaterial}, {@code parameters}, and
{@code idRequirement}. This is a convenience method that makes the tests code more concise and
readable.
java_src/src/main/java/com/google/crypto/tink/mac/internal/AesCmacTestUtil.java