@Test
    public void testImportInconsistentProgressIncrease() throws ParseException {
        // Bucket progress "file" that upon time of changing from 4 to 7
        // distribution bits and writing the progress had an active bucket
        String input = """
                VDS bucket progress file
                7
                32
                24
                128
                100000000000000c:0
                """;
        // Now we're at 8 distribution bits
        BucketIdFactory idFactory = new BucketIdFactory();
        ProgressToken p = new ProgressToken(input);
        assertEquals(7, p.getDistributionBitCount());
        assertEquals(p.getTotalBucketCount(), 1 << 7);
        assertEquals(p.getFinishedBucketCount(), 24);
        // Not yet corrected
        assertEquals(p.getPendingBucketCount(), 1);
        assertEquals(p.getActiveBucketCount(), 0);
        assertEquals(32, p.getBucketCursor());

        VisitorIterator iter = VisitorIterator.createFromDocumentSelection(
                "id.group != \"yahoo.com\"", idFactory, 1, p);

        // Now the range handler should have corrected the progress
        // (but not messed with the distribution bit count)
        assertEquals(7, p.getDistributionBitCount());
        assertEquals(p.getPendingBucketCount(), 1 << 3);
        assertEquals(p.getActiveBucketCount(), 0);
        assertEquals(24 + (1 << 3), p.getBucketCursor());

        iter.setDistributionBitCount(8);

        assertEquals(iter.getDistributionBitCount(), 8);
        assertEquals(p.getDistributionBitCount(), 8);
        assertEquals(iter.getBucketSource().getDistributionBitCount(), 8);

        assertEquals(p.getTotalBucketCount(), 1 << 8);
        assertEquals(p.getFinishedBucketCount(), 24 << 1);
        assertEquals(p.getPendingBucketCount(), 1 << 4); // Split 4 -> 7 bits, then 7 -> 8 bits
        assertEquals(p.getActiveBucketCount(), 0);
        assertEquals(p.getBucketCursor(), 24*2 + (1 << 4));
        assertTrue(iter.hasNext());
    }
Test increasing the distribution bits for a full bucket space range
source with no finished, active or pending buckets
@throws ParseException upon docsel parse failure (shouldn't happen)
documentapi/src/test/java/com/yahoo/documentapi/VisitorIteratorTestCase.java