[
https://issues.apache.org/jira/browse/MAHOUT-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048509#comment-13048509
]
Sebastian Schelter commented on MAHOUT-730:
-------------------------------------------
The problem is more subtile unfortunately. We have a lot of Mappers and
Reducers that have multiple output tuples and follow the pattern that they
instantiate a single output key and output value, invoke setter methods on
those and write them out in an iteration.
As Mockito.verify(..) is applied after the test code has run, you will only see
the last version of these objects.
Here some sample code to hopefully clarify the problem:
{code}
class SomeMapper ... {
public void map(... , Context ctx) {
Key key = new Key();
Value value = new Value();
for (...) {
key.set(...);
value.set(...);
ctx.write(key, value);
}
}
}
{code}
> Replace EasyMock with Mockito
> -----------------------------
>
> Key: MAHOUT-730
> URL: https://issues.apache.org/jira/browse/MAHOUT-730
> Project: Mahout
> Issue Type: Improvement
> Affects Versions: 0.6
> Reporter: Sebastian Schelter
> Assignee: Sebastian Schelter
>
> I'd like to switch our mock library from EasyMock to Mockito. The later one
> needs less code (and doesn't need to be "replayed") and it's more intuitive
> to write tests with it in my experience. Switching shouldn't be a big effort.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira