MarvelApi { public MarvelResult<SectionVO> listSeries(long characterId, int offset) throws IOException, MarvelException { Response<SectionDataWrapper> response = mService.listSeries(characterId, offset, MAX_FETCH_LIMIT).execute(); if (response.isSuccessful()) { return DataParser.parse(response.body()); } else { throw new MarvelException(response.code(), response.message()); } } private  MarvelApi(); static MarvelApi getInstance(); MarvelResult<CharacterVO> listCharacters(int offset); void listCharacters(int offset, MarvelCallback<CharacterDataWrapper> callback); void searchCharacters(String query, MarvelCallback<CharacterDataWrapper> callback); int getTotalOfCharacters(); MarvelResult<CharacterVO> getCharacter(int offset); MarvelResult<SectionVO> listComics(long characterId, int offset); void listComics(long characterId, int offset, MarvelCallback<SectionDataWrapper> callback); MarvelResult<SectionVO> listSeries(long characterId, int offset); void listSeries(long characterId, int offset, MarvelCallback<SectionDataWrapper> callback); MarvelResult<SectionVO> listStories(long characterId, int offset); void listStories(long characterId, int offset, MarvelCallback<SectionDataWrapper> callback); MarvelResult<SectionVO> listEvents(long characterId, int offset); void listEvents(long characterId, int offset, MarvelCallback<SectionDataWrapper> callback); static final int MAX_FETCH_LIMIT; }
@Test public void listSeriesByCharacter() throws IOException, MarvelException { MarvelResult<SectionVO> result = mMarvelApi.listSeries(CHARACTER_ID, OFFSET); assertNotNull(result); List<SectionVO> entries = result.getEntries(); assertNotNull(entries); assertFalse(entries.isEmpty()); }