Set<ServerAddress> hosts_A = Sets.newHashSet();
hosts_A.add(new ServerAddress(HOST_A));
chunksMapping.put(dbName + "." + collectionName + "-01", hosts_A);
chunksMapping.put(dbName + "." + collectionName + "-05", hosts_A);
ChunkInfo chunk1Info = new ChunkInfo(Arrays.asList(HOST_A), dbName + "."
+ collectionName + "-01");
chunk1Info.setMinFilters(Collections.<String, Object> emptyMap());
Map<String, Object> chunk1MaxFilters = Maps.newHashMap();
chunk1MaxFilters.put("name", Integer.valueOf(5));
chunk1Info.setMaxFilters(chunk1MaxFilters);
ChunkInfo chunk5Info = new ChunkInfo(Arrays.asList(HOST_A), dbName + "."
+ collectionName + "-05");
Map<String, Object> chunk5MinFilters = Maps.newHashMap();
chunk5MinFilters.put("name", Integer.valueOf(25));
chunk5Info.setMinFilters(chunk5MinFilters);
Map<String, Object> chunk5MaxFilters = Maps.newHashMap();
chunk5MaxFilters.put("name", Integer.valueOf(30));
chunk5Info.setMaxFilters(chunk5MaxFilters);
List<ChunkInfo> chunkList = Arrays.asList(chunk1Info, chunk5Info);
chunksInverseMapping.put(HOST_A, chunkList);
// entry2
Set<ServerAddress> hosts_B = Sets.newHashSet();
hosts_A.add(new ServerAddress(HOST_B));
chunksMapping.put(dbName + "." + collectionName + "-02", hosts_B);
ChunkInfo chunk2Info = new ChunkInfo(Arrays.asList(HOST_B), dbName + "."
+ collectionName + "-02");
Map<String, Object> chunk2MinFilters = Maps.newHashMap();
chunk2MinFilters.put("name", Integer.valueOf(5));
chunk2Info.setMinFilters(chunk2MinFilters);
Map<String, Object> chunk2MaxFilters = Maps.newHashMap();
chunk2MaxFilters.put("name", Integer.valueOf(15));
chunk2Info.setMaxFilters(chunk2MaxFilters);
chunkList = Arrays.asList(chunk2Info);
chunksInverseMapping.put(HOST_B, chunkList);
// enty3
Set<ServerAddress> hosts_C = Sets.newHashSet();
hosts_A.add(new ServerAddress(HOST_C));
chunksMapping.put(dbName + "." + collectionName + "-03", hosts_C);
chunksMapping.put(dbName + "." + collectionName + "-06", hosts_C);
ChunkInfo chunk3Info = new ChunkInfo(Arrays.asList(HOST_C), dbName + "."
+ collectionName + "-03");
Map<String, Object> chunk3MinFilters = Maps.newHashMap();
chunk5MinFilters.put("name", Integer.valueOf(15));
chunk3Info.setMinFilters(chunk3MinFilters);
Map<String, Object> chunk3MaxFilters = Maps.newHashMap();
chunk3MaxFilters.put("name", Integer.valueOf(20));
chunk3Info.setMaxFilters(chunk3MaxFilters);
ChunkInfo chunk6Info = new ChunkInfo(Arrays.asList(HOST_C), dbName + "."
+ collectionName + "-06");
Map<String, Object> chunk6MinFilters = Maps.newHashMap();
chunk5MinFilters.put("name", Integer.valueOf(25));
chunk6Info.setMinFilters(chunk6MinFilters);
Map<String, Object> chunk6MaxFilters = Maps.newHashMap();
chunk5MaxFilters.put("name", Integer.valueOf(30));
chunk6Info.setMaxFilters(chunk6MaxFilters);
chunkList = Arrays.asList(chunk3Info, chunk6Info);
chunksInverseMapping.put(HOST_C, chunkList);
// entry4
Set<ServerAddress> hosts_D = Sets.newHashSet();
hosts_A.add(new ServerAddress(HOST_D));
chunksMapping.put(dbName + "." + collectionName + "-04", hosts_D);
ChunkInfo chunk4Info = new ChunkInfo(Arrays.asList(HOST_D), dbName + "."
+ collectionName + "-04");
Map<String, Object> chunk4MinFilters = Maps.newHashMap();
chunk4MinFilters.put("name", Integer.valueOf(20));
chunk4Info.setMinFilters(chunk4MinFilters);
Map<String, Object> chunk4MaxFilters = Maps.newHashMap();
chunk4MaxFilters.put("name", Integer.valueOf(25));
chunk4Info.setMaxFilters(chunk4MaxFilters);
chunkList = Arrays.asList(chunk4Info);
chunksInverseMapping.put(HOST_D, chunkList);
mongoGroupScan = new MongoGroupScan();
mongoGroupScan.setChunksMapping(chunksMapping);