@SuppressWarnings("SameParameterValue")
  private void executeFunctionById(String functionId, Duration duration) {
    Execution<String[], Object, List<Object>> execution =
        uncheckedCast(FunctionService.onServer(serverPool));

    Throwable thrown = catchThrowable(() -> execution
        .setArguments(new String[] {valueOf(duration.toMillis()), TRUE.toString()})
        .execute(functionId)
        .getResult());

    assertThat(thrown)
        .as("Exception from function expected to succeed")
        .isNull();
  }
Acceptance tests for function executions timer on a loner server with no locator
geode-assembly/src/acceptanceTest/java/org/apache/geode/metrics/function/executions/FunctionExecutionsTimerLonerTest.java