public class MeanTest {
@Test
public void test() {
Point zero = new Point(0,0);
Point one = new Point(1,1);
Point half = new Point(0.5, 0.5);
Point quarter = new Point(0.25, 0.25);
Mean averager = new Mean();
averager.add(zero);
averager.add(one);
Point averageA = averager.toPoint();
assertEquals(half, averageA);
averager.reset();
averager.add(zero);
averager.add(zero);
averager.add(zero);
averager.add(one);
Point averageB = averager.toPoint();
assertEquals(quarter, averageB);
}