PaginatedList extends AbstractList<T> { @Override public final T get(final int index) { while (next != null && index >= knownValues.size()) { fetchNext(); } return knownValues.get(index); } PaginatedList(final ClientBuilder clientBuilder, final URI next,
        final Class<? extends T> type); @Override final T get(final int index); @Override final int size();  }
@Test void testGet1() { List<ClientIssue> issues = new PaginatedList<>(clientBuilder, ENDPOINT, ClientIssue.class); BitbucketIssue issue = issues.get(0); assertTrue(issue instanceof ClientIssue); }