List<Cluster> models = Lists.newArrayList();
DistanceMeasure measure = new ManhattanDistanceMeasure();
models.add(new Canopy(new DenseVector(2).assign(1), 0, measure));
models.add(new Canopy(new DenseVector(2), 1, measure));
models.add(new Canopy(new DenseVector(2).assign(-1), 2, measure));
ClusterClassifier classifier = new ClusterClassifier(models, new CanopyClusteringPolicy());
Vector pdf = classifier.classify(new DenseVector(2));
assertEquals("[0,0]", "[0.200, 0.600, 0.200]", AbstractCluster.formatVector(pdf, null));
pdf = classifier.classify(new DenseVector(2).assign(2));
assertEquals("[2,2]", "[0.493, 0.296, 0.211]", AbstractCluster.formatVector(pdf, null));
}