@Test
public void testManagedTask_Callable_ManagedTaskListener() throws Exception {

    final String RESULT = "result";
    CallableImpl<String> task = new CallableImpl<String>(RESULT);
    ManagedTaskListenerImpl taskListener = new ManagedTaskListenerImpl();
    
    Callable<String> wrapped = ManagedExecutors.managedTask(task, taskListener);
    ManagedTask managedTask = (ManagedTask) wrapped;
    assertTrue(taskListener == managedTask.getManagedTaskListener());
    assertEquals(RESULT, wrapped.call());
}