@Test
    public void testResumeVisitingProgress() {
        MockComponents mc = createDefaultMock("id.user==1234");

        mc.visitorSession.start();
        mc.executor.expectAndProcessTasks(1);

        assertEquals("CreateVisitorMessage(buckets=[\n" +
                "BucketId(0x80000000000004d2)\n" +
                "BucketId(0x0000000000000000)\n" +
                "]\n" +
                "selection='id.user==1234'\n)",
                replyToCreateVisitor(mc.sender, new BucketId(33, 1234 | (1L << 32))));

        // Abort session to stop sending visitors. Progress should still
        // be recorded.
        mc.visitorSession.abort();
        mc.executor.expectAndProcessTasks(1);
        mc.executor.expectNoTasks();
        assertTrue(mc.controlHandler.isDone());

        VisitorParameters params = createVisitorParameters("id.user==1234");
        params.setResumeToken(mc.controlHandler.getProgress());
        mc = createDefaultMock(params);
        mc.visitorSession.start();
        mc.executor.expectAndProcessTasks(1);

        assertEquals("CreateVisitorMessage(buckets=[\n" +
                "BucketId(0x80000000000004d2)\n" +
                "BucketId(0x84000001000004d2)\n" +
                "]\n" +
                "selection='id.user==1234'\n)",
                replyToCreateVisitor(mc.sender, ProgressToken.FINISHED_BUCKET));
        mc.executor.expectAndProcessTasks(1);
        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