public Optional<String> getPhoneNumber(final UUID phoneNumberIdentifier) {
    final QueryResponse response = dynamoDbClient.query(QueryRequest.builder()
        .tableName(tableName)
        .indexName(INDEX_NAME)
        .keyConditionExpression("#pni = :pni")
        .projectionExpression("#phone_number")
        .expressionAttributeNames(Map.of(
            "#phone_number", KEY_E164,
            "#pni", ATTR_PHONE_NUMBER_IDENTIFIER
        ))
        .expressionAttributeValues(Map.of(
            ":pni", AttributeValues.fromUUID(phoneNumberIdentifier)
        ))
        .build());

    if (response.count() == 0) {
      return Optional.empty();
    }

    if (response.count() > 1) {
      throw new RuntimeException(
          "Impossible result: more than one phone number returned for PNI: " + phoneNumberIdentifier);
    }

    return Optional.ofNullable(response.items().get(0).get(KEY_E164).s());
  }
@Test
  void getPhoneNumber() {
    final String number = "+18005551234";

    assertFalse(phoneNumberIdentifiers.getPhoneNumber(UUID.randomUUID()).isPresent());

    final UUID pni = phoneNumberIdentifiers.getPhoneNumberIdentifier(number);
    assertEquals(Optional.of(number), phoneNumberIdentifiers.getPhoneNumber(pni));
  }