collector2, null);
assertEquals("Number of map results", k + 1, collector2.getData().size());
// now verify that all points are accounted for
int count = 0;
Vector total = new DenseVector(2);
for (String key : collector2.getKeys()) {
List<Text> values = collector2.getValue(key);
assertEquals("too many values", 1, values.size());
String value = values.get(0).toString();
String[] pointInfo = value.split("\t");
count += Integer.parseInt(pointInfo[0]);
total = total.plus(AbstractVector.decodeVector(pointInfo[1]));
}
assertEquals("total points", 9, count);
assertEquals("point total[0]", 27, (int) total.get(0));
assertEquals("point total[1]", 27, (int) total.get(1));
}
}