@@ -0,0 +1,1136 @@
+package macrobase.summary.count;%0A%0Aimport com.google.common.collect.Lists;%0Aimport macrobase.analysis.summary.count.ExactCount;%0Aimport macrobase.analysis.summary.result.DatumWithScore;%0Aimport macrobase.datamodel.Datum;%0Aimport org.apache.commons.math3.linear.ArrayRealVector;%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class ExactCountTest %7B%0A    @Test%0A    public void testCount() %7B%0A        ExactCount ec = new ExactCount();%0A        HashMap%3CInteger, Integer%3E truth = new HashMap%3C%3E();%0A%0A        List%3CDatumWithScore%3E dws = new ArrayList%3C%3E();%0A        for(int i = 0; i %3C 100; ++i) %7B%0A            for(int j = 0; j %3C i; ++j) %7B%0A                dws.add(new DatumWithScore(new Datum(Lists.newArrayList(i), new ArrayRealVector()), 0));%0A                truth.compute(i, (k, v) -%3E v == null ? 1 : v + 1);%0A            %7D%0A        %7D%0A%0A        ec.count(dws);%0A%0A        for(Map.Entry%3CInteger, Double%3E cnt : ec.getCounts().entrySet()) %7B%0A            assertEquals(truth.get(cnt.getKey()), cnt.getValue(), 1e-10);%0A        %7D%0A    %7D%0A%7D%0A

Add test for ExactCount.