@Test
public void testSearch_String_SearchControls_AttributesMapper() throws Exception {

	expectGetReadOnlyContext();
	SearchControls controls = searchControlsOneLevel();
	controls.setReturningObjFlag(false);
	BasicAttributes expectedAttributes = new BasicAttributes();
	SearchResult searchResult = new SearchResult("", null, expectedAttributes);
	singleSearchResultWithStringBase(controls, searchResult);
	Object expectedResult = new Object();
	when(attributesMapperMock.mapFromAttributes(expectedAttributes)).thenReturn(expectedResult);
	List list = tested.search(DEFAULT_BASE_STRING, "(ou=somevalue)", controls, attributesMapperMock);
       verify(namingEnumerationMock).close();
       verify(dirContextMock).close();
       assertThat(list).isNotNull();
	assertThat(list).hasSize(1);
	assertThat(list.get(0)).isSameAs(expectedResult);
}