static void registerWithAwsKms(
      Optional<String> keyUri, Optional<String> credentialPath, @Nullable AWSKMS awsKms)
      throws GeneralSecurityException {
    AwsKmsClient client;
    if (keyUri.isPresent()) {
      client = new AwsKmsClient(keyUri.get());
    } else {
      client = new AwsKmsClient();
    }
    if (credentialPath.isPresent()) {
      client.withCredentials(credentialPath.get());
    } else {
      client.withDefaultCredentials();
    }
    client.withAwsKms(awsKms);
    KmsClients.add(client);
  }
Does the same as {@link #register}, but with an additional {@code awsKms} argument. Only used
for testing.
java_src/src/main/java/com/google/crypto/tink/integration/awskms/AwsKmsClient.java