@Test
  public void customCollectorDoesNotSeeExceptionAfterFunctionReturnsIllegalStateException() {
    // GEODE-1762 - clients throw from execute, but peers throw from rc.getResult
    try {
      ResultCollector rc = getExecution().execute((context) -> {
        context.getResultSender().lastResult(new IllegalStateException());
      });
      rc.getResult();
      fail("should have received an exception");
      // GEODE-1762 - clients throw a ServerOperationException
    } catch (Exception ignored) {
    }
    Assert.assertEquals(0, customCollector.getResult().size());
  }
Tests what happens if a function returns an exception as a result. This is kind a weird, but it
seems that the default collector will just throw it as an exception
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/FunctionServiceBase.java