@Test
    public void testSendSingleCreateVisitor() {
        VisitorParameters params = createVisitorParameters("");
        Set<BucketId> bucketsToVisit = new TreeSet<BucketId>();
        BucketId bid = new BucketId(16, 1234);
        bucketsToVisit.add(bid);
        params.setBucketsToVisit(bucketsToVisit);

        String expected = "CreateVisitorMessage(buckets=[\n" +
                bid + "\n" +
                "BucketId(0x0000000000000000)\n" +
                "]\n)";

        doTestSingleBucketVisit(params, expected);
    }
Mock the executor to keep things nicely single threaded for the testing.
No need to synchronize things here since we don't use multiple threads.
documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java