You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: replay_test.go
    path of file: ./repos/marketstore/replication
    
    the code of the file until where you have to start completion: package replication_test

import (
	"encoding/binary"
	"errors"
	"testing"
	"time"

	"github.com/google/go-cmp/c
    
func makeMockOffsetIndexBufferVariable(t time.Time, tf *utils.Timeframe, buffer []byte) wal.OffsetIndexBuffer {
	// Variable Length Record has IntervalTicks(4bytes) at the end of the buffer
	var oib []byte
	index := io.TimeToIndex(t, tf.Duration)
	offset := io.IndexToOffset(index, recordSize)

	offsetBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(offsetBytes, uint64(offset))
	oib = append(oib, offsetBytes...)

	indexBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(indexBytes, uint64(index))
	oib = append(oib, indexBytes...)

	oib = append(oib, buffer...)

	intervalsPerDay := 24 * time.Hour.Nanoseconds() / tf.Duration.Nanoseconds()
	intervalTicks := io.GetIntervalTicks32Bit(t, index, intervalsPerDay)
	intervalTicksBytes := make([]byte, 4)
	binary.LittleEndian.PutUint32(intervalTicksBytes, intervalTicks)
	oib = append(oib, intervalTicksBytes...)

	return oib
}