public void verifyFetchedTransactionIndex(final RemoteLogSegmentId id, final byte[] expected) {
            verifyFileContents(metadata -> remoteStorage.fetchIndex(metadata, TRANSACTION), id, expected);
        }
Verifies the content of the remote transaction index matches with the {@code expected} array.

@param id The unique ID of the remote log segment and associated resources (e.g. offset and time indexes).
@param expected The expected content.
storage/src/test/java/org/apache/kafka/server/log/remote/storage/LocalTieredStorageTest.java