@Test
public void testAdd() {

    NewComponentStatisticsAggregator agg = new NewComponentStatisticsAggregator();
    int rowCount = 10;
    for (int i = 0; i < rowCount; i++)
        agg.add(VectorUtils.of(0, 1, 2), i % 2 == 0);
    assertEquals(rowCount / 2, agg.rowCountForNewCluster());
    assertEquals(rowCount, agg.totalRowCount());
    assertArrayEquals(new double[] {0, 1, 2}, agg.mean().asArray(), 1e-4);
}