}
public void test5Pages() throws Exception {
//Get a connection manager based on the test properties
ConnectionManagerTester cm = TestHelpers.getTestConnectionManager();
cm.setLogCql(true);
cm.buildCluster(true);
CObjectShardList shardIdLists = new ShardListMock(Arrays.asList(1L,2L,3L,4L,5L));
//Build our keyspace definition object
CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "MultiInsertKeyspace.js");
//Rebuild the keyspace and get the object mapper
cm.buildKeyspace(definition, true);
ObjectMapper om = cm.getObjectMapper(definition);
om.setLogCql(true);
// Set up test data
// we will insert 200 objects
int nDataItems = 200;
List<Map<String, Object>> values2 = generateNObjects(nDataItems);
List<Map<String, Object>> updatedValues2 = Lists.newArrayList();
for (Map<String, Object> baseValue : values2) {
updatedValues2.add(JsonUtil.rhombusMapFromJsonMap(baseValue, definition.getDefinitions().get("object2")));
}
Map<String, List<Map<String, Object>>> multiInsertMap = Maps.newHashMap();
multiInsertMap.put("object2", updatedValues2);
//Insert data
om.insertBatchMixed(multiInsertMap);
// generate a executorIterator
SortedMap<String, Object> indexValues = Maps.newTreeMap();
indexValues.put("account_id", UUID.fromString("00000003-0000-0030-0040-000000030000"));
indexValues.put("user_id", UUID.fromString("00000003-0000-0030-0040-000000030000"));
UUID stop = UUID.fromString(uuidList.get(nDataItems-1));
CDefinition cDefinition = definition.getDefinitions().get("object2");
BaseCQLStatementIterator unBoundedIterator = (BaseCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, cDefinition, indexValues, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
Session session = cm.getRhombusSession(definition);
CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
cqlExecutorIterator.setPageSize((nDataItems/5));