@Test
public void testDoSearch_NamingException_NamingEnumeration() throws Exception {

	expectGetReadOnlyContext();
	when(searchExecutorMock.executeSearch(dirContextMock)).thenReturn(namingEnumerationMock);
	javax.naming.LimitExceededException ne = new javax.naming.LimitExceededException();
	when(namingEnumerationMock.hasMore()).thenThrow(ne);
	try {
		tested.search(searchExecutorMock, handlerMock);
		fail("LimitExceededException expected");
	}
	catch (LimitExceededException expected) {
		assertThat(true).isTrue();
	}
       verify(namingEnumerationMock).close();
       verify(dirContextMock).close();
}