Source:
<code>public void testLargeCount() throws Exception { logger.debug("Starting testLargeCount"); ConnectionManager cm = getConnectionManager(); CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "MultiInsertKeyspace.js"); assertNotNull(definition); cm.buildKeyspace(definition, true); logger.debug("Built keyspace: {}", definition.getName()); cm.setDefaultKeyspace(definition); ObjectMapper om = cm.getObjectMapper(); om.setLogCql(true); <START> List<Map<String, Object>> values2 = JsonUtil.rhombusMapFromResource(this.getClass().getClassLoader(), "MultiInsertTestData2.js"); <END> int nDataItems = 200; for (int i=0; i < nDataItems; i++) { Map<String, Object> value = Maps.newHashMap(); value.put("account_id","00000003-0000-0030-0040-000000030000"); value.put("user_id","00000003-0000-0030-0040-000000030000"); value.put("field2", "Value"+(i+8)); values2.add(value); } 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); om.insertBatchMixed(multiInsertMap); 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")); Criteria criteria = new Criteria(); criteria.setIndexKeys(indexValues); long count = om.count("object2", criteria); assertEquals(nDataItems+4, count); }</code><technical_language>empty List of objects instead of data json file? test easier read inserting nDataItems querying for a count equal nDataItems</technical_language>

Target:
public void testLargeCount() throws Exception { logger.debug("Starting testLargeCount"); ConnectionManager cm = getConnectionManager(); CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "MultiInsertKeyspace.js"); assertNotNull(definition); cm.buildKeyspace(definition, true); logger.debug("Built keyspace: {}", definition.getName()); cm.setDefaultKeyspace(definition); ObjectMapper om = cm.getObjectMapper(); om.setLogCql(true); int nDataItems = 200; List<Map<String, Object>> values2 = Lists.newArrayList(); for (int i=0; i < nDataItems; i++) { Map<String, Object> value = Maps.newHashMap(); value.put("account_id","00000003-0000-0030-0040-000000030000"); value.put("user_id","00000003-0000-0030-0040-000000030000"); value.put("field2", "Value"+(i+8)); values2.add(value); } 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); om.insertBatchMixed(multiInsertMap); 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")); Criteria criteria = new Criteria(); criteria.setIndexKeys(indexValues); long count = om.count("object2", criteria); assertEquals(nDataItems, count); }