SimplePrincipal jduke = new SimplePrincipal("jduke");
CallbackHandler handler = new SecurityAssociationHandler(jduke, "theduke".toCharArray());
JaasSecurityManager sm = new JaasSecurityManager("testStringCharArrayCredential", handler);
TimedCachePolicy cache = new TimedCachePolicy(600, true, 10);
cache.create();
cache.start();
sm.setCachePolicy(cache);
// Initial validation to populate the cache
assertTrue(sm.isValid(jduke, "theduke"));
// Validate that the String credential form uses the cache