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: lockwaiter_test.go
    path of file: ./repos/tidb/pkg/store/mockstore/unistore/util/lockwaiter
    
    the code of the file until where you have to start completion: // Copyright 2019-present PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file ex
    
func TestLockwaiterBasic(t *testing.T) {
	mgr := NewManager(&config.DefaultConf)

	keyHash := uint64(100)
	mgr.NewWaiter(1, 2, keyHash, 10)

	// basic check queue and waiter
	q := mgr.waitingQueues[keyHash]
	require.NotNil(t, q)
	waiter := q.waiters[0]
	require.Equal(t, uint64(1), waiter.startTS)
	require.Equal(t, uint64(2), waiter.LockTS)
	require.Equal(t, uint64(100), waiter.KeyHash)

	// check ready waiters
	keysHash := make([]uint64, 0, 10)
	keysHash = append(keysHash, keyHash)
	rdyWaiter, _ := q.getOldestWaiter()
	require.Equal(t, uint64(1), rdyWaiter.startTS)
	require.Equal(t, uint64(2), rdyWaiter.LockTS)
	require.Equal(t, uint64(100), rdyWaiter.KeyHash)

	// basic wake up test
	waiter = mgr.NewWaiter(3, 2, keyHash, 10)
	mgr.WakeUp(2, 222, keysHash)
	res := <-waiter.ch
	require.Equal(t, uint64(222), res.CommitTS)
	require.Len(t, q.waiters, 0)
	q = mgr.waitingQueues[keyHash]
	// verify queue deleted from map
	require.Nil(t, q)

	// basic wake up for deadlock test
	waiter = mgr.NewWaiter(3, 4, keyHash, 10)
	resp := &deadlockPb.DeadlockResponse{}
	resp.Entry.Txn = 3
	resp.Entry.WaitForTxn = 4
	resp.Entry.KeyHash = keyHash
	resp.DeadlockKeyHash = 30192
	mgr.WakeUpForDeadlock(resp)
	res = <-waiter.ch
	require.NotNil(t, res.DeadlockResp)
	require.Equal(t, uint64(3), res.DeadlockResp.Entry.Txn)
	require.Equal(t, uint64(4), res.DeadlockResp.Entry.WaitForTxn)
	require.Equal(t, keyHash, res.DeadlockResp.Entry.KeyHash)
	require.Equal(t, uint64(30192), res.DeadlockResp.DeadlockKeyHash)
	q = mgr.waitingQueues[4]
	// verify queue deleted from map
	require.Nil(t, q)
}