ManageTaskScheduler { public void clean() { LOG.info("Inside clean method -->TaskScheduler Instance:" + scheduler); if (scheduler != null) { scheduler.shutdown(); } } ManageTaskScheduler(ThreadPoolTaskScheduler scheduler); void init(); void clean();  }
@Test public void testClean() { ManageTaskScheduler taskScheduler = new ManageTaskScheduler(scheduler); taskScheduler.clean(); verify(scheduler, times(1)).shutdown(); }