CompletableFuture<Void> setPublicKey(final UUID accountIdentifier, final byte deviceId, final ECPublicKey publicKey) {
    return dynamoDbAsyncClient.putItem(PutItemRequest.builder()
            .tableName(tableName)
            .item(Map.of(
                KEY_ACCOUNT_UUID, getPartitionKey(accountIdentifier),
                KEY_DEVICE_ID, getSortKey(deviceId),
                ATTR_PUBLIC_KEY, AttributeValues.fromByteArray(publicKey.serialize())))
            .build())
        .thenRun(Util.NOOP);
  }
@Test
  void setPublicKey() {
    final UUID accountIdentifier = UUID.randomUUID();
    final byte deviceId = Device.PRIMARY_ID;
    final ECPublicKey publicKey = Curve.generateKeyPair().getPublicKey();

    assertEquals(Optional.empty(), clientPublicKeys.findPublicKey(accountIdentifier, deviceId).join());

    clientPublicKeys.setPublicKey(accountIdentifier, deviceId, publicKey).join();

    assertEquals(Optional.of(publicKey), clientPublicKeys.findPublicKey(accountIdentifier, deviceId).join());
  }