### Question:
AbstractTask implements Task<V> { @Override public void removeTaskListener(TaskListener l) { eventSupport.removeTaskListener(l); }  @Override void addTaskListener(TaskListener l); @Override void removeTaskListener(TaskListener l); @Override void setProgressEndpoints(double begin, double end); double getBeginProgress(); double getEndProgress(); @Override V get(); @Override V get(long timeout, TimeUnit unit); boolean isPaused(); synchronized void pause(); synchronized void play(); void reset(); final void run(); boolean cancel(boolean mayInterruptIfRunning); @Override /** * This version is mandated by the Future<V> interface. */ boolean isCancelled(); boolean isDone(); String getErrorMessage(); Throwable getError(); double getProgress(); boolean isBegun(); boolean isEnded(); final TaskOutcome getTaskOutcome();  }### Answer:
@Test public void testRemoveTaskListener() throws InterruptedException { System.out.println("removeTaskListener"); TestTaskListener l = new TestTaskListener(); AbstractTask instance = new CapitalizeStringTask("a string to capitalize"); instance.addTaskListener(l); instance.removeTaskListener(l); Thread t = new Thread(instance); t.start(); t.join(); assertThat(l.taskBegunCount(), is(0)); assertThat(l.taskEndedCount(), is(0)); }