EasyMock.createMock(Reducer.Context.class);
Counter userCounters = EasyMock.createMock(Counter.class);
EasyMock.expect(context.getCounter(ToUserVectorsReducer.Counters.USERS)).andReturn(userCounters);
userCounters.increment(1);
context.write(EasyMock.eq(new VarLongWritable(12L)), MathHelper.vectorMatches(
MathHelper.elem(TasteHadoopUtils.idToIndex(34L), 1.0), MathHelper.elem(TasteHadoopUtils.idToIndex(56L), 2.0)));
EasyMock.replay(context, userCounters);
Collection<VarLongWritable> varLongWritables = new LinkedList<VarLongWritable>();
varLongWritables.add(new EntityPrefWritable(34L, 1.0f));
varLongWritables.add(new EntityPrefWritable(56L, 2.0f));
new ToUserVectorsReducer().reduce(new VarLongWritable(12L), varLongWritables, context);
EasyMock.verify(context, userCounters);
}