SortControlDirContextProcessor extends AbstractFallbackRequestAndResponseControlDirContextProcessor { public boolean isSorted() { return sorted; } SortControlDirContextProcessor(String sortKey); boolean isSorted(); int getResultCode(); String getSortKey(); Control createRequestControl();  }
@Test public void testPostProcess_InvalidResponseControl() throws Exception { int resultSize = 50; byte pageSize = 8; byte[] value = new byte[1]; value[0] = pageSize; byte[] cookie = encodeDirSyncValue(resultSize, value); DirSyncResponseControl control = new DirSyncResponseControl("dummy", true, cookie); when(ldapContextMock.getResponseControls()).thenReturn(new Control[] { control }); tested.postProcess(ldapContextMock); assertThat(tested.isSorted()).isEqualTo(false); }