@Test
public void testDoSearch_NameNotFoundException() throws Exception {

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