for (int i = 0; i < commandsPerPlan.length; i++) {
totalCommands += commandsPerPlan[i];
plans.add(new FakeProcessorPlan(commandsPerPlan[i]));
}
BatchedUpdatePlan plan = new BatchedUpdatePlan(plans, totalCommands, null);
TupleBatch batch = plan.nextBatch();
assertEquals(totalCommands, batch.getRowCount());
for (int i = 1; i <= totalCommands; i++) {
assertEquals(new Integer(1), batch.getTuple(i).get(0));
}
}