List<ArrayListMultimap<String, Long>> expectedOutput = Lists.newArrayList();
for (int i = 0; i < 5; i++) {
expectedOutput.add(ArrayListMultimap.<String, Long>create());
}
Marshaller<String> marshaller = Marshallers.getStringMarshaller();
HashingSharder sharder = new HashingSharder(5);
for (long l = -10000; l < 10000; l++) {
String mod37 = String.valueOf(Math.abs(l) % 37);
expectedOutput.get(sharder.getShardForKey(marshaller.toBytes(mod37))).put(mod37, l);
}
for (int i = 0; i < 5; i++) {
assertEquals(expectedOutput.get(i).keySet().size(), actualOutput.get(i).size());
for (KeyValue<String, List<Long>> actual : actualOutput.get(i)) {
List<Long> value = new ArrayList<>(actual.getValue());