@Test public void testPageSize() throws Exception { RepositoryItemReader<Object> reader = new RepositoryItemReaderBuilder<>().repository(this.repository) .sorts(this.sorts) .maxItemCount(5) .methodName("foo") .name("bar") .pageSize(2) .build(); reader.read(); assertEquals("page size was not expected value.", 2, this.pageRequestContainer.getValue().getPageSize()); }