assertEquals("koala{SYSTEM_SALT_VALUE}", castResult.getCredentials());
assertEquals("koala", castResult.getCredentials());
    public void testAuthenticatesWhenASaltIsUsed() {        UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken("marissa",                "koala");        SystemWideSaltSource salt = new SystemWideSaltSource();        salt.setSystemWideSalt("SYSTEM_SALT_VALUE");        DaoAuthenticationProvider provider = new DaoAuthenticationProvider();        provider.setAuthenticationDao(new MockAuthenticationDaoUserMarissaWithSalt());        provider.setSaltSource(salt);        provider.setUserCache(new MockUserCache());        Authentication result = provider.authenticate(token);        if (!(result instanceof UsernamePasswordAuthenticationToken)) {            fail(                "Should have returned instance of UsernamePasswordAuthenticationToken");        }        UsernamePasswordAuthenticationToken castResult = (UsernamePasswordAuthenticationToken) result;        assertEquals("marissa", castResult.getPrincipal());        assertEquals("koala{SYSTEM_SALT_VALUE}", castResult.getCredentials());        assertEquals("ROLE_ONE", castResult.getAuthorities()[0].getAuthority());        assertEquals("ROLE_TWO", castResult.getAuthorities()[1].getAuthority());    }