@Test
public void median(){

	ValueAggregator<Double> aggregator = new ValueAggregator.Median<>(this.valueFactory, 3);
	try {
		aggregator.median();
		fail();
	} catch(UndefinedResultException ure){
		// Ignored
	}
	aggregator.add(4d);
	aggregator.add(5d);
	assertEquals(new DoubleValue((4d + 5d) / 2d), aggregator.median());
	aggregator.add(6d);
	assertEquals(new DoubleValue(5d), aggregator.median());
}