@Test
public void testNullContext() throws Exception {

    final LdapPersonAttributeDao impl = new LdapPersonAttributeDao();
    try {
        impl.afterPropertiesSet();
        fail("BeanCreationException should have been thrown with no context configured");
    } catch (final BeanCreationException ise) {
        //expected
    }
}