@Test
public void testGetObjectInstance_BaseSet() throws Exception {

	Attributes expectedAttributes = new NameAwareAttributes();
	expectedAttributes.put("someAttribute", "someValue");
	when(contextMock2.getNameInNamespace()).thenReturn("dc=jayway, dc=se");
	DirContextAdapter adapter = (DirContextAdapter) tested.getObjectInstance(contextMock, LdapUtils.newLdapName(
			"ou=some unit"), contextMock2, new Hashtable(), expectedAttributes);
       verify(contextMock).close();
	assertThat(adapter.getDn().toString()).isEqualTo("ou=some unit");
	assertThat(adapter.getNameInNamespace()).isEqualTo("ou=some unit,dc=jayway,dc=se");
	assertThat(adapter.getAttributes()).isEqualTo(expectedAttributes);
}