@Test
public void testGetObjectInstance_CompositeName() throws Exception {

       Attributes expectedAttributes = new NameAwareAttributes();
	expectedAttributes.put("someAttribute", "someValue");
	CompositeName name = new CompositeName();
	name.add(DN_STRING);
	
	DirContextAdapter adapter = (DirContextAdapter) tested.getObjectInstance(contextMock, name, null,
			new Hashtable(), expectedAttributes);
       verify(contextMock).close();
	assertThat(adapter.getDn()).isEqualTo(DN);
	assertThat(adapter.getAttributes()).isEqualTo(expectedAttributes);
}