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: meta_kv_test.go
    path of file: ./repos/tidb/br/pkg/stream
    
    the code of the file until where you have to start completion: // Copyright 2022 PingCAP, Inc. Licensed under Apache-2.0.

package stream

import (
	"bytes"
	"testing"

	"github.com/pingcap/tidb/pkg/meta"
	"github.com/pingcap/tidb/pkg/tablecodec"
	"github.com/pingcap/tidb/pkg/util/codec"
	"github.com/stretchr/testify/require"
)

func encodeTxnMetaKey(key []byte, field []byte, ts uint64) []byte {
	k := tablecodec.EncodeMetaKey(key, field)
	txnKey := codec.EncodeBytes(nil, k)
	return codec.EncodeUintDesc(txnKey, ts)
}

func TestRawMetaKeyForDB(t *testing.T) {
	var (
		dbID int64  = 1
		ts   uint64 = 400036290571534337
		mDbs        = []byte("DBs")
	)

	txnKey := en
    
func TestWriteCFValueWithShortValue(t *testing.T) {
	var (
		ts                   uint64 = 400036290571534337
		shortValue                  = []byte("pingCAP")
		lastChangeTs         uint64 = 9527
		versionsToLastChange uint64 = 95271
	)

	buff := make([]byte, 0, 9)
	buff = append(buff, WriteTypePut)
	buff = codec.EncodeUvarint(buff, ts)
	buff = append(buff, flagShortValuePrefix)
	buff = append(buff, byte(len(shortValue)))
	buff = append(buff, shortValue...)
	buff = append(buff, flagLastChangePrefix)
	buff = codec.EncodeUint(buff, lastChangeTs)
	buff = codec.EncodeUvarint(buff, versionsToLastChange)

	v := new(RawWriteCFValue)
	err := v.ParseFrom(buff)
	require.NoError(t, err)
	require.True(t, v.HasShortValue())
	require.True(t, bytes.Equal(v.GetShortValue(), shortValue))
	require.False(t, v.hasGCFence)
	require.False(t, v.hasOverlappedRollback)
	require.Equal(t, v.lastChangeTs, lastChangeTs)
	require.Equal(t, v.versionsToLastChange, versionsToLastChange)
	require.Equal(t, v.txnSource, uint64(0))

	data := v.EncodeTo()
	require.True(t, bytes.Equal(data, buff))
}