public UUID getPhoneNumberIdentifier(final String phoneNumber) {
    final GetItemResponse response = GET_PNI_TIMER.record(() -> dynamoDbClient.getItem(GetItemRequest.builder()
        .tableName(tableName)
        .key(Map.of(KEY_E164, AttributeValues.fromString(phoneNumber)))
        .projectionExpression(ATTR_PHONE_NUMBER_IDENTIFIER)
        .build()));

    final UUID phoneNumberIdentifier;

    if (response.hasItem()) {
      phoneNumberIdentifier = AttributeValues.getUUID(response.item(), ATTR_PHONE_NUMBER_IDENTIFIER, null);
    } else {
      phoneNumberIdentifier = generatePhoneNumberIdentifierIfNotExists(phoneNumber);
    }

    if (phoneNumberIdentifier == null) {
      throw new RuntimeException("Could not retrieve phone number identifier from stored item");
    }

    return phoneNumberIdentifier;
  }
@Test
  void getPhoneNumberIdentifier() {
    final String number = "+18005551234";
    final String differentNumber = "+18005556789";

    final UUID firstPni = phoneNumberIdentifiers.getPhoneNumberIdentifier(number);
    final UUID secondPni = phoneNumberIdentifiers.getPhoneNumberIdentifier(number);

    assertEquals(firstPni, secondPni);
    assertNotEquals(firstPni, phoneNumberIdentifiers.getPhoneNumberIdentifier(differentNumber));
  }