Affects Version/s: 0.9.0
Fix Version/s: 1.0.0
We should allow users to mock the Context object. I have thought about this and I think there are two ways to go about it. In MRUnit we have a single codebase which supports Hadoop 0.20 - 2.0.
However, Context itself was changed from a class in 0.20 to an interface in > 0.20. As such, we use Mockito to create the object regardless of the version of Hadoop the user is using.
There are two ways to implement providing a custom context to MRUnit.
1) User provides MRUnit context object
User can use any mocking tool they wish
Puts massive ugliness into MRUnit code (I implemented this)
MRUnit is not providing much value since inputs/outputs and such come from Context.
2) User can "get" context from MRUnit and then override any mocked methods via Mockito
Much cleaner to implement
User must use Mockito to override methods on context