}
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<KMeansInfo> values = collector2.getValue(key);
assertEquals("too many values", 1, values.size());
//String value = values.get(0).toString();
KMeansInfo info = values.get(0);
count += info.getPoints();
total = total.plus(info.getPointTotal());
}
assertEquals("total points", 9, count);
assertEquals("point total[0]", 27, (int) total.get(0));
assertEquals("point total[1]", 27, (int) total.get(1));
}
}