Postman { public void listComicDetails(String resourceURI, Context context) { if (!"".equals(resourceURI) && context != null) { this.mRequestService.setUrl(this.mRequestUtil.parseExistentRequest(resourceURI, context)); this.mRequestService.setBody(EventCatalog.e0001, Request.Method.GET); this.mRequestService.execute(context); } } Postman(); void listCharacters(Context context, String query, int limit, int offset); void listComicDetails(String resourceURI, Context context); void cancelRequests(); static final String TAG; }
@Test public void testListComicDetails() { String resourceUri = "resourceUri"; Context context = Mockito.mock(Context.class); Mockito.doCallRealMethod().when(postman).listComicDetails(resourceUri, context); postman.listComicDetails(resourceUri, context); Mockito.verify(mRequestService).setBody(EventCatalog.e0001, Request.Method.GET); Mockito.verify(mRequestService).execute(context); }