def test_revision_diff_multi_revision_multi_bucket_modified(self):
        revision_ids = []

        bucket_name = test_utils.rand_name('bucket')
        alt_bucket_name = test_utils.rand_name('bucket')
        bucket_names = [bucket_name, alt_bucket_name] * 2

        # Create revisions by modifying documents in `bucket_name` and
        # `alt_bucket_name`.
        for bucket_idx in range(4):
            payload = base.DocumentFixture.get_minimal_multi_fixture(count=3)
            documents = self.create_documents(
                bucket_names[bucket_idx], payload)
            revision_id = documents[0]['revision_id']
            revision_ids.append(revision_id)

        # Between revision_ids[0] and [1], bucket_name is unmodified and
        # alt_bucket_name is created.
        self._verify_buckets_status(
            revision_ids[0], revision_ids[1],
            {bucket_name: 'unmodified', alt_bucket_name: 'created'})

        # Between revision_ids[0] and [2], bucket_name is modified (by 2) and
        # alt_bucket_name is created (by 1).
        self._verify_buckets_status(
            revision_ids[0], revision_ids[2],
            {bucket_name: 'modified', alt_bucket_name: 'created'})

        # Between revision_ids[0] and [3], bucket_name is modified (by [2]) and
        # alt_bucket_name is created (by [1]) (as well as modified by [3]).
        self._verify_buckets_status(
            revision_ids[0], revision_ids[3],
            {bucket_name: 'modified', alt_bucket_name: 'created'})

        # Between revision_ids[1] and [2], bucket_name is modified but
        # alt_bucket_name remains unmodified.
        self._verify_buckets_status(
            revision_ids[1], revision_ids[2],
            {bucket_name: 'modified', alt_bucket_name: 'unmodified'})

        # Between revision_ids[1] and [3], bucket_name is modified (by [2]) and
        # alt_bucket_name is modified by [3].
        self._verify_buckets_status(
            revision_ids[1], revision_ids[3],
            {bucket_name: 'modified', alt_bucket_name: 'modified'})

        # Between revision_ids[2] and [3], alt_bucket_name is modified but
        # bucket_name remains unmodified.
        self._verify_buckets_status(
            revision_ids[2], revision_ids[3],
            {bucket_name: 'unmodified', alt_bucket_name: 'modified'})