title: Received unexpected output in MRUnit
body: <p>I'm getting the following MRUnit error:</p>
  <blockquote>
  <p>ERROR mrunit.TestDriver: <strong>Received unexpected output (60, mrdp.MyCustomClass@73207f36)</strong></p>
  <p>ERROR mrunit.TestDriver: <strong>Missing expected output (60, mrdp.MyCustomClass@6f73cf45) at position 0</strong></p>
  </blockquote>
  <p>I've created a <code>MyCustomClass</code> which implements <code>Writable</code>, and has 4 int attributes. This is the output Value of my Mapper.</p>
  <p>The following is the code of the mapper's MRUnit test:</p>
  <pre><code>@Test
  public void testMapper() throws IOException {
      MyCustomClass result = new MyCustomClass();
      result.setAttr1(1);
      result.setAttr2(0);
      result.setAttr3(0);
      result.setAttr4(0);
  
      mapDriver.withInput(new LongWritable(1), new Text(&quot;60,5596,1,256&quot;));
      mapDriver.addOutput(new Text(&quot;60&quot;), result);
      mapDriver.runTest();
  }
  </code></pre>
  <p>My Mapper should call its setter <code>setAttr1(1)</code>, when locating the &quot;1&quot; in the <code>new Text(&quot;60,5596,1,256&quot;)</code> here above.</p>
  <p>How can I test for this result with a custom class (with several attributes)? The job execution is successful, I just don't know how to make the MRUnit test work.</p>
  <pre><code>$ hadoop fs -cat patterns/minmaxcount/outuserprefs/part*
  23  mrdp.MyCustomClass@4cf15f6c
  60  mrdp.MyCustomClass@4cf15f6c
  </code></pre>