@Test
public void testRemove() throws Exception {
DataModel model = getDataModel();
MemoryDiffStorage storage = new MemoryDiffStorage(model, Weighting.UNWEIGHTED, Long.MAX_VALUE);
RunningAverage average1 = storage.getDiff(0, 2);
assertEquals(0.1, average1.getAverage(), EPSILON);
assertEquals(3, average1.getCount());
RunningAverage average2 = storage.getDiff(1, 2);
assertEquals(0.23333332935969034, average2.getAverage(), EPSILON);
assertEquals(3, average2.getCount());
storage.removeItemPref(4, 2, 0.8f);
average1 = storage.getDiff(0, 2);
assertEquals(0.1, average1.getAverage(), EPSILON);
assertEquals(2, average1.getCount());
average2 = storage.getDiff(1, 2);
assertEquals(0.1, average2.getAverage(), EPSILON);
assertEquals(2, average2.getCount());
}