assertTrue(true);
}
}
public void testAddCacheHit() {
AuthorizationCache cache = AuthorizationCache.getInstance();
try {
cache.isUserAuthorized("roadrunner", "/x/y", "read");
fail("This user is not yet added. Should be a cache miss");
} catch (AuthorizationCacheException e) {
assertTrue(true);
}
try {
cache.addToCache("roadrunner", "/x/y", "read", true);
boolean b = cache.isUserAuthorized("roadrunner", "/x/y", "read");
assertTrue(b);
} catch (AuthorizationCacheException e) {
fail("Should be a cache hit.");
}