Created
September 5, 2017 14:59
-
-
Save splatch/2e14be3907a95ddd9e9bdb4f9d149673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cache<String, Integer> cache = getCache(CACHE_ID); // wrapper around Hazelcast Map | |
cache.put("one", 1); | |
cache.put("two", 2); | |
cache.put("three", 3); | |
Map<String, Integer> map = cache.asMap(); // map representation of cache | |
assertThat(map).hasSize(3).containsOnly( | |
entry("one", 1), | |
entry("two", 2), | |
entry("three", 3) | |
); | |
cache.evict("one"); // removal of elements | |
assertThat(map).hasSize(2).containsOnly( // <- this assertion fails | |
entry("two", 2), | |
entry("three", 3) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment