### Question:
SavingTask implements Runnable { @Override public void run() { try { LoggableEvent[] eventsToSave; synchronized (sendQueue) { eventsToSave = Iterables.toArray(sendQueue, LoggableEvent.class); } eventStore.save(eventsToSave); } catch (IOException ex) { Logger.getLogger(SavingTask.class.getName()).log(Level.WARNING, "Failed to save events", ex); } } SavingTask(ArrayDeque<LoggableEvent> sendQueue, EventStore eventStore); @Override void run();  }### Answer:
@Test(expected = MockitoException.class) public void runTest() throws IOException { task.run(); }