@Test public void withTotal() throws Exception { final PagedQueryResult<String> result = PagedQueryResult.of("hello").withTotal(500L); assertThat(result.getCount()).isEqualTo(1); assertThat(result.getOffset()).isEqualTo(0); assertThat(result.getResults()).isEqualTo(Collections.singletonList("hello")); assertThat(result.getTotal()).isEqualTo(500); }