2

I need some help with this:

Example:

void method1{
       MyObject obj1=new MyObject();
       obj1.method1();
    }

I want to mock obj1.method1() in my test but I can't access obj1 from outside. Is there any way to do this with powermock and easymock. Now I know it can work with powermock and mockito.

  • Possible duplicate - http://stackoverflow.com/questions/9841623/mockito-how-to-verify-method-was-called-on-an-object-created-within-a-method – mre Apr 10 '12 at 16:02

0 Answers0