PaginatedList extends AbstractList<T> { @Override public final int size() { while (next != null && knownSize < 0) { fetchNext(); } assert knownSize >= 0; return knownSize; } 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 testSize1() { List<ClientIssue> issues = new PaginatedList<>(clientBuilder, ENDPOINT, ClientIssue.class); assertTrue(issues.size() > 0); }