@Test
    public void testResumeVisitingAlreadyCompleted() {
        ProgressToken token;
        // First, get a finished token
        {
            MockComponents mc = createDefaultMock("id.user==1234");
            mc.visitorSession.start();
            mc.executor.expectAndProcessTasks(1);
            replyToCreateVisitor(mc.sender, ProgressToken.FINISHED_BUCKET);
            mc.executor.expectAndProcessTasks(1);
            assertTrue(mc.controlHandler.isDone());
            token = mc.controlHandler.getProgress();
        }
        assertTrue(token.isFinished());

        VisitorParameters visitorParameters = createVisitorParameters("id.user==1234");
        visitorParameters.setResumeToken(token);
        MockComponents mc = createDefaultMock(visitorParameters);

        mc.visitorSession.start();
        mc.executor.expectNoTasks();
        assertTrue(mc.controlHandler.isDone());
    }
Test assembly of message traces in session. Trace level propagation
is already tested elsewhere.
documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java