@Test
  public void defaultCollectorThrowsExceptionAfterFunctionReturnsFunctionExceptionAsIntermediateResult() {
    // GEODE-1762 - clients throw from execute, but peers throw from rc.getResult
    thrown.expect(FunctionException.class);
    thrown.expectCause(is((Throwable) null));
    ResultCollector rc = getExecution().execute((context) -> {
      context.getResultSender().sendResult(new FunctionException());
      context.getResultSender().lastResult("done");
    });
    final Object result = rc.getResult();
  }
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