@Test
    public void testBucketProgressFraction() {
        double epsilon = 0.00001;
        // No progress
        BucketId b_0 = new BucketId();
        // No split; only superbucket (100%)
        BucketId b_100_0 = new BucketId(16, 1234);
        // 1 split (1/2)
        BucketId b_50_1 = new BucketId(17,  1234);
        BucketId b_100_1 = new BucketId(17, 1234 | (1 << 16));
        // 2 splits (1/4)
        BucketId b_25_2 = new BucketId(18, 1234);
        BucketId b_50_2 = new BucketId(18, 1234 | (2 << 16));
        BucketId b_75_2 = new BucketId(18, 1234 | (1 << 16));
        BucketId b_100_2 = new BucketId(18, 1234 | (3 << 16));

        ProgressToken p = new ProgressToken(16);

        BucketId sb = new BucketId(16, 1234);

        assertEquals(p.progressFraction(new BucketId(32, 1234), b_0), 0.0, epsilon);

        assertEquals(p.progressFraction(sb, b_100_0), 1.0, epsilon);

        assertEquals(p.progressFraction(sb, b_50_1),  0.5, epsilon);
        assertEquals(p.progressFraction(sb, b_100_1), 1.0, epsilon);

        assertEquals(p.progressFraction(sb, b_25_2),  0.25, epsilon);
        assertEquals(p.progressFraction(sb, b_50_2),  0.5,  epsilon);
        assertEquals(p.progressFraction(sb, b_75_2),  0.75, epsilon);
        assertEquals(p.progressFraction(sb, b_100_2), 1.0,  epsilon);

        assertEquals(p.progressFraction(new BucketId(0x8000000000000000L),
                new BucketId(0xb0000fff00000000L)), 1.0, epsilon);
    }
Test that ensures doing update(superbucket, 0) simply puts the bucket back in
pending
documentapi/src/test/java/com/yahoo/documentapi/VisitorIteratorTestCase.java