Pages { public static <ResourceT> Page<ResourceT> empty() { return new Page<ResourceT>() { @Override public boolean hasNextPage() { return false; } @Override public String getNextPageToken() { return ""; } @Override public Page<ResourceT> getNextPage() { return null; } @Override public Iterable<ResourceT> iterateAll() { return Collections.emptyList(); } @Override public Iterable<ResourceT> getValues() { return Collections.emptyList(); } }; } private  Pages(); static Page<ResourceT> empty();  }
@Test public void testEmpty() { assertThat(Pages.<Integer>empty().iterateAll()).isEmpty(); }