How do you mock a chained method call in EasyMock? I have a chained method call:
srvc.getServiceManager().getDetails(Integer.parseInt(msgId)); I've tried to do
expect(srvc.getServiceManager().getDetails(Integer.parseInt(msgId))) .andReturn((String) notNull()); This throws a NullPointerException.
Trying to break this into two expectations also does not work. In that case I get
matcher calls were used outside expectations
How do I get around this issue?