@Test
public void testGetAbstractContextSourceFromApplicationContext() throws Exception {

	when(applicationContextMock.getBeanNamesForType(BaseLdapPathSource.class))
               .thenReturn(new String[]{"contextSource"});
	final LdapContextSource expectedContextSource = new LdapContextSource();
       HashMap<String, BaseLdapPathSource> expectedBeans = new HashMap<String, BaseLdapPathSource>() {{
           put("dummy", expectedContextSource);
       }};
       when(applicationContextMock.getBeansOfType(BaseLdapPathSource.class)).thenReturn(expectedBeans);
	BaseLdapPathSource result = tested.getBaseLdapPathSourceFromApplicationContext();
	assertThat(result).isSameAs(expectedContextSource);
}