@@ -0,0 +1,2059 @@
+package es.tid.smartsteps.footfalls.catchments;%0A%0Aimport java.io.IOException;%0Aimport java.util.List;%0A%0Aimport org.apache.hadoop.io.LongWritable;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.mrunit.mapreduce.MapDriver;%0Aimport org.apache.hadoop.mrunit.types.Pair;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport es.tid.cosmos.base.data.TypedProtobufWritable;%0Aimport es.tid.smartsteps.footfalls.data.generated.EntryProtocol.Catchments;%0A%0A/**%0A *%0A * @author dmicol%0A */%0Apublic class CatchmentsParserMapperTest extends CatchmentsBasedTest %7B%0A%0A    private MapDriver%3C%0A            LongWritable, Text,%0A            Text, TypedProtobufWritable%3CCatchments%3E%3E instance;%0A    private LongWritable key;%0A    private Text value;%0A%0A    public CatchmentsParserMapperTest() throws IOException %7B%7D%0A%0A    @Before%0A    public void setUp() throws IOException %7B%0A        this.instance = new MapDriver%3C%0A                LongWritable, Text,%0A                Text, TypedProtobufWritable%3CCatchments%3E%3E(%0A                        new CatchmentsParserMapper());%0A        this.instance.setConfiguration(this.conf);%0A        this.key = new LongWritable(102L);%0A        this.value = new Text(this.catchments);%0A    %7D%0A%0A    @Test%0A    public void shouldProduceOutput() throws IOException %7B%0A        List%3CPair%3CText, TypedProtobufWritable%3CCatchments%3E%3E%3E results =%0A                this.instance%0A                        .withInput(this.key, this.value)%0A                        .run();%0A        assertNotNull(results);%0A        assertEquals(1, results.size());%0A        final Pair%3CText, TypedProtobufWritable%3CCatchments%3E%3E result =%0A                results.get(0);%0A        assertEquals(%22000012006440%22, result.getFirst().toString());%0A        assertTrue(result.getSecond().get() instanceof Catchments);%0A    %7D%0A%0A    @Test%0A    public void shouldFailToParse() %7B%0A        this.instance%0A                .withInput(this.key, new Text(%22blah blah%22))%0A                .runTest();%0A    %7D%0A%7D%0A

Add CatchmentsParserMapperTest