private int getMapValueForKey(Map<String, Integer> map, String key) {
    if (map.containsKey(key)) {
      return map.get(key);
    } else {
      return 0;
    }
  }
Written to test fix for Bug #47132
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java