Tuesday, June 27, 2017

MockInvocationHandler - Usage is: expect(a.foo()).andXXX()

Getting following exception while 

java.lang.IllegalStateException: missing behavior definition for the preceding method call:
HttpSession.getAttribute("recordDescriptor")
Usage is: expect(a.foo()).andXXX()
    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:42)
    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:85)
    at $Proxy9.getAttribute(Unknown Source)
    at com.test.services.SampleService.<init>(SampleService.java:37)
    at com.testapp.service.webapp.session.SampleService.<init>(SampleService.java:32)



No comments:

Post a Comment