Vector vector = new DenseVector(new double[] { 4.5, 1.2 });
Reducer<VarIntWritable,FeatureVectorWithRatingWritable,IndexedVarIntWritable,FeatureVectorWithRatingWritable>.Context ctx =
EasyMock.createMock(Reducer.Context.class);
ctx.write(new IndexedVarIntWritable(456, 123), new FeatureVectorWithRatingWritable(123, 2.35f, vector));
EasyMock.replay(ctx);
new ParallelALSFactorizationJob.JoinFeatureVectorAndRatingsReducer().reduce(new VarIntWritable(123),
Arrays.asList(new FeatureVectorWithRatingWritable(456, vector),
new FeatureVectorWithRatingWritable(456, 2.35f)), ctx);
EasyMock.verify(ctx);
}