public void testRemovePref() throws Exception {
double eps = 0.0001;
DataModel model = getDataModelPocked();
MemoryDiffStorage storage = new MemoryDiffStorage(model, Weighting.WEIGHTED, Long.MAX_VALUE);
RunningAverageAndStdDev average = (RunningAverageAndStdDev) storage.getDiff(0, 1);
assertEquals(-0.033333, average.getAverage(), eps);
assertEquals(0.32145, average.getStandardDeviation(), eps);
assertEquals(3, average.getCount());
storage.removeItemPref(2, 1, 0.1f);
average = (RunningAverageAndStdDev) storage.getDiff(0, 1);
assertEquals(0.00000001, average.getAverage(), eps);
assertEquals(0.44721, average.getStandardDeviation(), eps);
assertEquals(2, average.getCount());
}