private void verify_BatchWrite_ToMultiTables() {
{ // Verify the 2 items put to the 1st table via the batch operation
ItemCollection<?> itemCol = dynamo.getTable(TABLE_NAME)
.query(HASH_KEY_NAME, "TestingPutItemInBatch",
new RangeKeyCondition(RANGE_KEY_NAME).between(666, 777));
int count = 0;
for (Item item: itemCol) {
System.out.println(item);
count++;
}
Assert.assertTrue(count == 2);
}
{ // Verify the 2 keys deleted from the 1st table via the batch operation
ItemCollection<?> itemCol = dynamo.getTable(TABLE_NAME)
.query(HASH_KEY_NAME, "foo",
new RangeKeyCondition(RANGE_KEY_NAME).between(1, 2));
int count = 0;
for (Item item : itemCol) {
System.out.println(item);
count++;
}