Lets say I have a method that looks like this:
public static String[] parseFoo(Foo anObject){
Foo anotherObject = parseFoo2(anObject);
...
}
private static Foo parseFoo2(Foo anObject){
...
}
and both methods are in the same class. parseFoo2 is just a helper method that helps parseFoo get some stuff done. I'm trying to test the method parseFoo. Is there anyone in EasyMock that I can specify a return value on that private method call for parseFoo2 like the way I can specify instance method calls for an object with
EasyMock.createMock(...);
anObject.expect(...).andReturn(...);
because I want to test the public method, but I don't want to have to go into the private method and test the implementation inside.
Thanks