### Question:
UnifiedListenerManager { public synchronized void executeTaskWithUnifiedListener(@NonNull DownloadTask task, @NonNull DownloadListener listener) { attachListener(task, listener); task.execute(hostListener); } UnifiedListenerManager(); synchronized void detachListener(int id); synchronized void addAutoRemoveListenersWhenTaskEnd(int id); synchronized void removeAutoRemoveListenersWhenTaskEnd(int id); synchronized void detachListener(DownloadListener listener); synchronized boolean detachListener(@NonNull DownloadTask task,
                                               DownloadListener listener); synchronized void attachListener(@NonNull DownloadTask task,
                                            @NonNull DownloadListener listener); synchronized void attachAndEnqueueIfNotRun(@NonNull DownloadTask task,
                                                      @NonNull DownloadListener listener); synchronized void enqueueTaskWithUnifiedListener(@NonNull DownloadTask task,
                                                            @NonNull DownloadListener listener); synchronized void executeTaskWithUnifiedListener(@NonNull DownloadTask task,
                                                            @NonNull DownloadListener listener); @NonNull DownloadListener getHostListener();  }### Answer:
@Test public void executeTaskWithUnifiedListener() { final DownloadTask task = mockTask(1); doNothing().when(listenerManager).attachListener(eq(task), eq(listener)); doNothing().when(task).execute(eq(listenerManager.hostListener)); listenerManager.executeTaskWithUnifiedListener(task, listener); verify(listenerManager).attachListener(eq(task), eq(listener)); verify(task).execute(eq(listenerManager.hostListener)); }