PagedResultsDirContextProcessor extends AbstractFallbackRequestAndResponseControlDirContextProcessor { public Control createRequestControl() { byte[] actualCookie = null; if (cookie != null) { actualCookie = cookie.getCookie(); } return super.createRequestControl(new Class<?>[] { int.class, byte[].class, boolean.class }, new Object[] {pageSize, actualCookie, critical}); } PagedResultsDirContextProcessor(int pageSize);  PagedResultsDirContextProcessor(int pageSize, PagedResultsCookie cookie); PagedResultsCookie getCookie(); int getPageSize(); int getResultSize(); Control createRequestControl(); boolean hasMore();  }
@Test public void testCreateRequestControl() throws Exception { PagedResultsControl control = (PagedResultsControl) tested .createRequestControl(); assertThat(control).isNotNull(); }
@Test public void testCreateRequestControl_CookieSet() throws Exception { PagedResultsCookie cookie = new PagedResultsCookie(new byte[0]); PagedResultsDirContextProcessor tested = new PagedResultsDirContextProcessor(20, cookie); PagedResultsControl control = (PagedResultsControl) tested .createRequestControl(); assertThat(control).isNotNull(); }