### Question:
TaskService { public TaskManager getTaskManager() { return taskManager; }  @PostConstruct synchronized void init(); @PreDestroy synchronized void destroy(); TaskManager getTaskManager();  }### Answer:
@Test public void getTaskManager() { TaskService tested = getTested(); tested.taskManager = Mockito.mock(TaskManager.class); Assert.assertEquals(tested.taskManager, tested.getTaskManager()); }