### Question:
Project3DMapper extends Mapper<LongWritable,Text,Text,LongWritable> { @Override protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { try { Iterator<String> parts= SPACE_SPLITTER.split(value.toString()).iterator(); String lang=parts.next(); String page=parts.next(); Long count=Long.parseLong(parts.next()); context.write(new Text(lang+" "+page),new LongWritable(count)); } catch(NoSuchElementException|NumberFormatException nsee) { LOG.warn("invalid input line ["+value.toString()+"] in file "+context.getInputSplit().getLocations()); } }    }### Answer:
@Test public void enPassesThrough() throws IOException, InterruptedException { mapper.map(new LongWritable(1L),new Text("en Slapstick 778 1551"),context); verify(context).write(new Text("en Slapstick"),new LongWritable(778)); }
@Test public void frPassesThrough() throws IOException, InterruptedException { mapper.map(new LongWritable(1L),new Text("fr Slapstick 778 1551"),context); verify(context).write(new Text("fr Slapstick"),new LongWritable(778)); }