public <T> void compareSupplierResultAsync(final T expected, final Supplier<T> experimentSupplier, final Executor executor) {
    final Timer.Sample sample = Timer.start();

    try {
      compareFutureResult(expected, CompletableFuture.supplyAsync(experimentSupplier, executor));
    } catch (final Exception e) {
      recordError(e, sample);
    }
  }
@Test
  void compareSupplierResultAsyncError() throws InterruptedException {
    final ExecutorService experimentExecutor = Executors.newSingleThreadExecutor();

    experiment.compareSupplierResultAsync(12, () -> {
      throw new RuntimeException("OH NO");
    }, experimentExecutor);
    experimentExecutor.shutdown();
    experimentExecutor.awaitTermination(1, TimeUnit.SECONDS);

    verify(errorTimer).record(anyLong(), eq(TimeUnit.NANOSECONDS));
  }