Hi Experts,
I am writing testcases for an struts action class method. The method contains calls to another service. So I am using Easymock to handle calls on the service.
BusinessService service = createMock(BusinessService);
service.update(param);
replay();
My problem is - I do not know what value the 'param' object is going to have inside the action class when the call is to be made to service. Inside action, param is created on fly based on certain conditions and then service.update(param) is invoked.
It always gives me this error
Unexpected method call update()
expected: 1, actual: 0
Please help me solving my issue.
Thanks and regards,
Pushker Chaubey