0
如何在EasyMock中模拟链接方法调用?我有一个链接的方法调用:使用EasyMock模拟链接方法
srvc.getServiceManager().getDetails(Integer.parseInt(msgId));
我试图做
expect(srvc.getServiceManager().getDetails(Integer.parseInt(msgId)))
.andReturn((String) notNull());
这将引发NullPointerException.
试图闯入两点期望这也不起作用。在这种情况下,我得到
匹配的呼叫使用了外面的期望
如何解决此问题得到什么?