@Test
  public void customCollectorDoesNotSeeExceptionFunctionThrowsIllegalState() {
    // GEODE-1762 - clients throw from execute, but peers throw from rc.getResult
    IgnoredException.addIgnoredException("java.lang.IllegalStateException");
    try {
      ResultCollector rc = getExecution().withCollector(customCollector).execute((context) -> {
        throw new IllegalStateException();
      });
      rc.getResult();
      fail("should have received an exception");
    } catch (FunctionException 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