@Test
public void testSearch_ContextMapper_ReturningAttrs() throws Exception {

	expectGetReadOnlyContext();
	String[] attrs = new String[0];
	SearchControls controls = searchControlsOneLevel();
	controls.setReturningAttributes(attrs);
	Object expectedObject = new Object();
	SearchResult searchResult = new SearchResult("", expectedObject, new BasicAttributes());
	singleSearchResult(controls, searchResult);
	Object expectedResult = expectedObject;
	when(contextMapperMock.mapFromContext(expectedObject)).thenReturn(expectedResult);
	List list = tested.search(nameMock, "(ou=somevalue)", 1, attrs, contextMapperMock);
       verify(namingEnumerationMock).close();
       verify(dirContextMock).close();
       assertThat(list).isNotNull();
	assertThat(list).hasSize(1);
	assertThat(list.get(0)).isSameAs(expectedResult);
}