public void appendInitialRecords(List<ApiMessageAndVersion> records) {
        int initialLeaderEpoch = 1;
        shared.append(OptionalLong.empty(), new LeaderChangeBatch(
            new LeaderAndEpoch(OptionalInt.empty(), initialLeaderEpoch + 1)));
        shared.append(OptionalLong.empty(),
            new LocalRecordBatch(initialLeaderEpoch + 1, 0, records));
        shared.append(OptionalLong.empty(),
            new LeaderChangeBatch(new LeaderAndEpoch(OptionalInt.of(0), initialLeaderEpoch + 2)));
    }
Append some records to the log. This method is meant to be called before the
controllers are started, to simulate a pre-existing metadata log.

@param records   The records to be appended. Will be added in a single batch.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManagerTestEnv.java