ISPN-4376 AdvancedCache.filterEntries(...) does not respect configured
cache flags

Add tests for Replicated, Local, and Invalidation modes
Refactor tests to use a common base class