}
@Test
public void testAccumulator() {
NDCGPredictMetric metric = new NDCGPredictMetric();
MeanAccumulator acc = metric.createContext(null, null, null);
assertThat(acc, notNullValue());
assert acc != null;
metric.measureUser(user1, acc);
assertEquals(1, acc.getCount());
assertEquals(0.9533, acc.getTotal(), 0.0001);
metric.measureUser(user2, acc);
assertEquals(2, acc.getCount());
assertEquals(1.9110, acc.getTotal(), 0.0001);
metric.measureUser(user3, acc);
assertEquals(3, acc.getCount());
assertEquals(2.8069, acc.getTotal(), 0.0001);
}