provider.setApplicationContext(new ClassPathXmlApplicationContext( "net/sf/acegisecurity/util/filtertest-valid.xml")); assertEquals(ClassPathXmlApplicationContext.class.getName(), provider.getContext().getClass().getName());
    public void testGettersSetters() {        DaoAuthenticationProvider provider = new DaoAuthenticationProvider();        provider.setPasswordEncoder(new ShaPasswordEncoder());        assertEquals(ShaPasswordEncoder.class,            provider.getPasswordEncoder().getClass());        provider.setSaltSource(new SystemWideSaltSource());        assertEquals(SystemWideSaltSource.class,            provider.getSaltSource().getClass());        provider.setUserCache(new EhCacheBasedUserCache());        assertEquals(EhCacheBasedUserCache.class,            provider.getUserCache().getClass());        assertFalse(provider.isForcePrincipalAsString());        provider.setForcePrincipalAsString(true);        assertTrue(provider.isForcePrincipalAsString());    }