### Question:
NetworkTaskManager { public void createAndExecute(Call... call) { cancelTasks(); AsyncTask networkTask = networkTaskCreator.create(addReviewActivity); networkTask.execute(call); taskList.add(networkTask); } NetworkTaskManager(AddReviewActivity<T> addReviewActivity, NetworkTaskCreator<AsyncTask, T> networkTaskCreator); void createAndExecute(Call... call); List<AsyncTask> getTaskList(); void setTaskList(List<AsyncTask> taskList);  }### Answer:
@Test public void createAndExecute() throws Exception { doReturn(networkTask).when(networkTaskCreator).create(addReviewActivity); NetworkTaskManager networkTaskManager = new NetworkTaskManager(addReviewActivity, networkTaskCreator); networkTaskManager.createAndExecute(call); verify(networkTask).execute(call); assertEquals( new ArrayList<MovieNetworkTask>() {{ add(networkTask); }}, networkTaskManager.getTaskList() ); }