@Test
public void getClusterStatisticsCosineTest() {

    Row[] rows0 = new Row[] {
        Row.of(1, "9 9 9"),
        Row.of(1, "9.1 9.1 9.1"),
        Row.of(1, "9.2 9.2 9.2")
    };
    ClusterMetricsSummary clusterMetricsSummary = ClusterEvaluationUtil.getClusterStatistics(Arrays.asList(rows0),
        new CosineDistance());
    Assert.assertEquals(clusterMetricsSummary.k, 1);
    Assert.assertEquals(clusterMetricsSummary.clusterId.get(0), "1");
    Assert.assertEquals(clusterMetricsSummary.clusterCnt.get(0).intValue(), 3);
    Assert.assertEquals(clusterMetricsSummary.compactness.get(0), 0, 0.001);
    Assert.assertEquals(clusterMetricsSummary.distanceSquareSum.get(0), 0, 0.01);
    Assert.assertEquals(clusterMetricsSummary.vectorNormL2Sum.get(0), 3.0, 0.01);
    Assert.assertEquals(clusterMetricsSummary.meanVector.get(0).normL2Square(), 1.0, 0.01);
    Assert.assertEquals(clusterMetricsSummary.k, 1);
    Assert.assertEquals(clusterMetricsSummary.total, 3);
}