}});
executer.execute(task, state, executionContext);
assertThat(wrappedFailure.get(), instanceOf(TaskExecutionException.class));
TaskExecutionException exception = (TaskExecutionException) wrappedFailure.get();
assertThat(exception.getTask(), equalTo((Task) task));
assertThat(exception.getMessage(), equalTo("Execution failed for <task>."));
assertThat(exception.getCause(), sameInstance(failure));
}