private void doTestBucketKeyGeneration(int db) {
        // Can't use longs since they won't sort properly when MSB is set
        ProgressToken.BucketKeyWrapper[] keys = new ProgressToken.BucketKeyWrapper[1 << db];

        // Generate entire bucket space for db
        for (int i = 0; i < (1 << db); ++i) {
            keys[i] = new ProgressToken.BucketKeyWrapper(
                    ProgressToken.bucketToKey(new BucketId(db, i).getId()));
        }
        Arrays.sort(keys);

        boolean consistentKeys = true;
        // Verify that makeNthBucketKey yields the same result as the equivalent
        // ordered value in the array of keys
        for (int i = 0; i < (1 << db); ++i) {
            long genKey = ProgressToken.makeNthBucketKey(i, db);
            long knownKey = keys[i].key();
            if (genKey != knownKey) {
                consistentKeys = false;
                break;
            }
        }
        assertTrue(consistentKeys);
    }
Test that ensures doing update(superbucket, 0) simply puts the bucket back in
pending
documentapi/src/test/java/com/yahoo/documentapi/VisitorIteratorTestCase.java