@Test
    public void testExecutionErrorInSendCreateVisitorsTask() {
        MockComponents mc = createDefaultMock();
        mc.sender.setExceptionOnSend(new IllegalArgumentException("closed, come back tomorrow"));
        mc.visitorSession.start();
        mc.controlHandler.resetMock(); // clear messages
        mc.executor.expectAndProcessTasks(1);
        assertEquals(0, mc.sender.getMessageCount());

        assertTrue(mc.controlHandler.isDone());
        assertEquals("onDone : FAILURE - 'Got exception of type java.lang.IllegalArgumentException " +
                "with message 'closed, come back tomorrow' while attempting to send visitors'\n",
                mc.controlHandler.toString());
    }
Test branch where we don't know how to handle a certain reply type.
This should never happen (since we only get replies for messages we've
already sent) but deal with it anyway!
documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java