/** * tests {@link org.apache.mahout.cf.taste.hadoop.item.ItemFilterMapper} */ @Test public void testItemFilterMapper() throws Exception { Mapper<LongWritable,Text,VarLongWritable,VarLongWritable>.Context context = EasyMock.createMock(Mapper.Context.class); context.write(new VarLongWritable(34L), new VarLongWritable(12L)); context.write(new VarLongWritable(78L), new VarLongWritable(56L)); EasyMock.replay(context); ItemFilterMapper mapper = new ItemFilterMapper(); mapper.map(null, new Text("12,34"), context); mapper.map(null, new Text("56,78"), context); EasyMock.verify(context); }