final Task b = createTask("b");
taskExecuter.addTaskExecutionListener(listener);
taskExecuter.addTasks(toList(a, b));
context.checking(new Expectations() {{
one(listener).beforeExecute(a);
one(listener).afterExecute(with(equalTo(a)), with(notNullValue(TaskState.class)));
one(listener).beforeExecute(b);
one(listener).afterExecute(with(equalTo(b)), with(notNullValue(TaskState.class)));
}});