8687888990919293949596
callback.onResponseReceived(null, resp); // now call the error case Exception e = new Exception(); try{ callback.onError(null, e); fail(); } catch(RuntimeException ee){ assertSame(e, ee.getCause()); }