public CompletionHandler<?> proceed(
      TaskInstance taskInstance, ExecutionContext executionContext) {
    if (interceptors.isEmpty()) {
      return executionHandler.execute(taskInstance, executionContext);
    } else {
      ExecutionInterceptor nextInterceptor = interceptors.get(0);
      List<ExecutionInterceptor> rest = interceptors.subList(1, interceptors.size());
      return nextInterceptor.execute(
          taskInstance, executionContext, new ExecutionChain(rest, executionHandler));
    }
  }
@Test
  public void happy() {
    AtomicInteger counter = new AtomicInteger(0);
    CountingExecutionHandler executionHandler = new CountingExecutionHandler(counter);
    ExecutionChain chain =
        new ExecutionChain(
            List.of(new CountingInterceptor(counter), new CountingInterceptor(counter)),
            executionHandler);

    chain.proceed(new TaskInstance("task1", "id1"), dummyContext());

    assertEquals(3, counter.get());
  }