assertEquals(0.23333333333333334, average.getAverage(), EPSILON);
assertEquals(3, average.getCount());
}
public void testUpdate() throws Exception {
DataModel model = getDataModel();
MemoryDiffStorage storage = new MemoryDiffStorage(model, Weighting.UNWEIGHTED, false, Long.MAX_VALUE);
storage.updateItemPref(1, 0.5f, false);
RunningAverage average = storage.getDiff(1, 2);
assertEquals(0.06666666666666668, average.getAverage(), EPSILON);
assertEquals(3, average.getCount());