TransactWriteItem buildTransactWriteItemForInsertion(final UUID identifier, final byte deviceId, final K preKey) {
    return TransactWriteItem.builder()
        .put(Put.builder()
            .tableName(tableName)
            .item(getItemFromPreKey(identifier, deviceId, preKey))
            .build())
        .build();
  }
@Test
  void buildTransactWriteItemForInsertion() {
    final RepeatedUseSignedPreKeyStore<K> keys = getKeyStore();

    assertEquals(Optional.empty(), keys.find(UUID.randomUUID(), Device.PRIMARY_ID).join());

    final UUID identifier = UUID.randomUUID();
    final K signedPreKey = generateSignedPreKey();

    getDynamoDbClient().transactWriteItems(TransactWriteItemsRequest.builder()
        .transactItems(keys.buildTransactWriteItemForInsertion(identifier, Device.PRIMARY_ID, signedPreKey))
        .build());

    assertEquals(Optional.of(signedPreKey), keys.find(identifier, Device.PRIMARY_ID).join());
  }