@Test
    public void testSilentlyIgnoreBucketDeletedNotFoundErrors() {
        MockComponents mc = createDefaultMock("id.user==1234");
        mc.controlHandler.resetMock();
        mc.visitorSession.start();
        mc.executor.expectAndProcessTasks(1);
        replyErrorToCreateVisitor(mc.sender, new Error(
                DocumentProtocol.ERROR_BUCKET_NOT_FOUND,
                "dave's not here, maaan"));
        mc.executor.expectAndProcessTasks(1); // reply
        // Should just resend with a 100ms delay
        mc.executor.expectAndProcessTasks(1, new long[] { 100 });

        // Now hit it with a BUCKET_DELETED error, which is also silent
        replyErrorToCreateVisitor(mc.sender, new Error(
                DocumentProtocol.ERROR_BUCKET_DELETED,
                "dave's not here either, maaan!"));
        mc.executor.expectAndProcessTasks(1); // reply
        // Should also resend with a 100ms delay
        mc.executor.expectAndProcessTasks(1, new long[] { 100 });

        assertEquals("CreateVisitorMessage(buckets=[\n" +
                "BucketId(0x80000000000004d2)\n" +
                "BucketId(0x0000000000000000)\n" +
                "]\n" +
                "selection='id.user==1234'\n)",
                replyToCreateVisitor(mc.sender, ProgressToken.FINISHED_BUCKET));
        mc.executor.expectAndProcessTasks(1);

        assertTrue(mc.controlHandler.isDone());
        assertEquals("onProgress : 0 active, 0 pending, 1 finished, 1 total\n" +
                "onVisitorStatistics : 0 buckets visited, 0 docs returned\n" +
                "onDone : SUCCESS - ''\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