### Question:
DispatchTask implements Runnable { @Override public void run() { dispatcher.dispatch(notification); } DispatchTask(Notification notification, Dispatcher dispatcher); @Override void run(); final Notification notification; final Dispatcher dispatcher; }### Answer:
@Test public void runShouldInvokeDispatcherDispatchMethod() throws Exception { new DispatchTask(notification, dispatcher).run(); Mockito.verify(dispatcher).dispatch(notification); }