Zones extends OkHttpBaseApi { static String findNextPageUrl(Document doc) { if (doc.select(".pageNavLink[title*=nächsten]").size() > 0) { Element link = doc.select(".pageNavLink[title*=nächsten]").first(); return link.absUrl("href"); } else { return null; } }  @Override List<SearchField> parseSearchFields(); @Override void start(); @Override void init(Library lib, HttpClientFactory httpClientFactory); @Override SearchRequestResult search(List<SearchQuery> queries); @Override SearchRequestResult searchGetPage(int page); @Override DetailedItem getResultById(String id, String homebranch); @Override DetailedItem getResult(int nr); @Override ReservationResult reservation(DetailedItem item, Account acc,
            int useraction, String selection); @Override ProlongResult prolong(String media, Account account, int useraction,
            String Selection); @Override CancelResult cancel(String media, Account account, int useraction,
            String selection); @Override AccountData account(Account acc); @Override String getShareUrl(String id, String title); @Override int getSupportFlags(); @Override ProlongAllResult prolongAll(Account account, int useraction,
            String selection); @Override SearchRequestResult filterResults(Filter filter, Option option); @Override void checkAccountData(Account account); @Override void setLanguage(String language); @Override Set<String> getSupportedLanguages();  }
@Test public void testAccountPages() { Document page1 = Jsoup.parse(readResource("/zones/medialist/koeln_pages_1.html")); Document page2 = Jsoup.parse(readResource("/zones/medialist/koeln_pages_2.html")); page1.setBaseUri(BASE_URL); page2.setBaseUri(BASE_URL); String nextPage1 = Zones.findNextPageUrl(page1); assertNotNull(nextPage1); assertEquals(nextPage1, "https: ".dll/Obj_4051458325195?Style=Portal3&SubStyle=&Lang=GER&ResponseEncoding" + "=utf-8&Method=PageDown&PageSize=10"); String nextPage2 = Zones.findNextPageUrl(page2); assertNull(nextPage2); }