private void populateRegion(Region<String, String> region) {
    keysForGet = new HashSet<>();
    expectedValues = new HashSet<>();

    for (int i = 0; i < 20; i++) {
      String key = "KEY_" + i;
      String value = "VALUE_" + i;

      region.put(key, value);

      if (i == 4 || i == 7 || i == 9) {
        keysForGet.add(key);
        expectedValues.add(value);
      }
    }
  }
This tests make sure that, in case of LonerDistributedSystem we don't get ClassCast Exception.
Just making sure that the function executed on lonerDistributedSystem.

<p>
Regression test for bug: If invoked from LonerDistributedSystem, FunctionService.onMembers()
throws ClassCastException
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/execute/FunctionExecutionOnLonerRegressionTest.java