@Test
public void testDoSearch_DirContextProcessor() throws Exception {

	expectGetReadOnlyContext();
	SearchResult searchResult = new SearchResult(null, null, null);
	when(searchExecutorMock.executeSearch(dirContextMock)).thenReturn(namingEnumerationMock);
	when(namingEnumerationMock.hasMore()).thenReturn(true, false);
	when(namingEnumerationMock.next()).thenReturn(searchResult);
	tested.search(searchExecutorMock, handlerMock, dirContextProcessorMock);
       verify(dirContextProcessorMock).preProcess(dirContextMock);
       verify(dirContextProcessorMock).postProcess(dirContextMock);
       verify(handlerMock).handleNameClassPair(searchResult);
       verify(namingEnumerationMock).close();
       verify(dirContextMock).close();
}