public static void addMapBehavior(Region mock) {
    // Allow the region to behave like a fake map
    Map underlyingMap = new HashMap();
    when(mock.get(any())).then(invocation -> underlyingMap.get(invocation.getArguments()[0]));
    when(mock.put(any(), any())).then(invocation -> underlyingMap.put(invocation.getArguments()[0],
        invocation.getArguments()[1]));
  }
Add real map behavior to a mock region. Useful for tests where you want to mock region that
just behaves like a map.

@param mock the mockito mock to add behavior too.
geode-junit/src/main/java/org/apache/geode/test/fake/Fakes.java