@Test
    public void testFailVisitingOnFatalError() {
        MockComponents mc = createDefaultMock("id.user==1234");
        mc.visitorSession.start();
        mc.controlHandler.resetMock();
        mc.executor.expectAndProcessTasks(1);
        replyToCreateVisitor(mc.sender, (reply) -> {
            reply.addError(new Error(
                    DocumentProtocol.ERROR_INTERNAL_FAILURE,
                    "node caught fire"));
        });
        mc.executor.expectAndProcessTasks(1); // reply
        mc.executor.expectNoTasks();
        assertEquals(0, mc.sender.getMessageCount());
        assertTrue(mc.visitorSession.isDone());

        assertEquals("onVisitorError : INTERNAL_FAILURE: node caught fire\n" +
                "onDone : FAILURE - 'INTERNAL_FAILURE: node caught fire'\n",
                mc.controlHandler.toString());
    }
Test that different visitors within the same session get different
names.
documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java