@Test(groups = "functional", testName = "api.flags.DecoratedCacheTest")
public class DecoratedCacheTest {
public void testDecoratedCacheFlagsSet() {
ClassLoader thisClassLoader = this.getClass().getClassLoader();
CacheImpl impl = new CacheImpl("baseCache");
DecoratedCache decoratedCache = new DecoratedCache(impl, thisClassLoader);
DecoratedCache nofailCache = (DecoratedCache) decoratedCache.withFlags(Flag.FAIL_SILENTLY);
assert nofailCache.getFlags().contains(Flag.FAIL_SILENTLY);
assert nofailCache.getFlags().size() == 1;
DecoratedCache asyncNoFailCache = (DecoratedCache) nofailCache.withFlags(Flag.FORCE_ASYNCHRONOUS);