Backport fix from upstream
JDG-1056 Test Suite Stabilization and Fixes
ISPN-7631 Cache.entrySet() entries don't implement Map.Entry.equals() correctly