I'm attempting to use MRUnit, but none of the examples I've seen quite match what I'm trying to do.
My reducer outputs a key and mutation, but I can't seem to compare the mutation with what's expected. It shows the objects as being the same, but with an address of 0 and the following error:
junit.framework.AssertionFailedError: expected: <org.apache.accumulo.core.data.Mutation@0> but was <org.apache.accumulo.core.data.Mutation@0>
I'm using the reduceDriver.run() method, and attempting assertEquals on my expected mutation object with the actual. Is there anything I'm missing?
Thanks for any input.
Mutation has an appropriate equals() method, at least it does in the 1.4.x line. However, that method calls a private serialize() method that modifies the data about to be checked.
I've gotten around this in the past by wrapping the Mutation in a new Mutation, which calls serialize under the hood: