I have mocked the request and the response using the easymock, but its still going through each line in the request method and getting exception.
Eg:
public class helper{
public String getCB(){
Response response = serviceImpl.getDefaultMethod(request);
return response.getString();
}
Test:
expect(MockServiceImpl.getDefaultMethod(mockRequest)).andReturn(mockResponse);
Getting an exception, Its going inside the getDefaultMethod()
.
I'm not understanding why its going through the code in that method. Can anyone please help me?