@Test
  public void testRemoteMultiKeyExecutionWithCollectorNoResult_byName() throws Exception {
    VM accessor = getHost(0).getVM(3);
    VM datastore0 = getHost(0).getVM(0);
    VM datastore1 = getHost(0).getVM(1);
    VM datastore2 = getHost(0).getVM(2);

    accessor.invoke(() -> {
      createPartitionedRegion(regionName, 0, 0);
    });

    datastore0.invoke(() -> {
      createPartitionedRegion(regionName, 10, 0);
      FunctionService.registerFunction(new TestFunction(false, TEST_FUNCTION7));
    });

    datastore1.invoke(() -> {
      createPartitionedRegion(regionName, 10, 0);
      FunctionService.registerFunction(new TestFunction(false, TEST_FUNCTION7));
    });

    datastore2.invoke(() -> {
      createPartitionedRegion(regionName, 10, 0);
      FunctionService.registerFunction(new TestFunction(false, TEST_FUNCTION7));
    });

    accessor.invoke(() -> {
      PartitionedRegion pr = getPartitionedRegion(regionName);

      Set<String> keySet = new HashSet<>();
      for (int i = pr.getTotalNumberOfBuckets() * 2; i > 0; i--) {
        keySet.add(STRING_KEY + i);
      }

      int valueIndex = 0;
      for (String key : keySet) {
        int value = valueIndex++;
        pr.put(key, value);
      }

      Function<Object> function = new TestFunction<>(false, TEST_FUNCTION7);
      FunctionService.registerFunction(function);
      Execution<Boolean, Object, List<Object>> dataSet =
          FunctionService.onRegion(pr).withCollector(new CustomResultCollector());

      ResultCollector<Object, List<Object>> resultCollector =
          dataSet.withFilter(keySet).setArguments(true).execute(function.getId());

      assertThatThrownBy(resultCollector::getResult).isInstanceOf(FunctionException.class)
          .hasMessageStartingWith(
              String.format("Cannot %s result as the Function#hasResult() is false",
                  "return any"));
    });
  }
Test multi-key remote execution by a pure accessor which doesn't have the function factory
present. ResultCollector = CustomResultCollector haveResults = false;
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/PRFunctionExecutionDUnitTest.java