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: throttle_test.go
    path of file: ./repos/cockroach/pkg/ccl/sqlproxyccl/throttler
    
    the code of the file until where you have to start completion: // Copyright 2021 The Cockroach Authors.
//
// Licensed as a CockroachDB Enterprise file under the Cockroach Community
// License (the "License"); you may not use this file except in compliance with
// the License. You may obtain a cop
    
func TestTriggerThrottle(t *testing.T) {
	type testCase struct {
		backoffBefore time.Duration
		backoffAfter  time.Duration
		maxBackoff    time.Duration
		timeAfter     time.Time
	}

	now := timeutil.Now()

	tests := []testCase{
		{
			backoffBefore: time.Second,
			backoffAfter:  time.Second * 2,
			maxBackoff:    time.Hour,
			timeAfter:     now.Add(time.Second),
		},
		{
			backoffBefore: time.Minute,
			backoffAfter:  time.Minute * 2,
			maxBackoff:    time.Hour,
			timeAfter:     now.Add(time.Minute),
		},
		{
			backoffBefore: time.Minute * 30,
			backoffAfter:  time.Hour,
			maxBackoff:    time.Hour,
			timeAfter:     now.Add(time.Minute * 30),
		},
		{
			backoffBefore: time.Minute * 45,
			backoffAfter:  time.Hour,
			maxBackoff:    time.Hour,
			timeAfter:     now.Add(time.Minute * 45),
		},
		{
			backoffBefore: time.Hour,
			backoffAfter:  time.Hour,
			maxBackoff:    time.Hour,
			timeAfter:     now.Add(time.Hour),
		},
	}

	for _, test := range tests {
		l := newThrottle(test.backoffBefore)
		require.Equal(t, l.nextBackoff, test.backoffBefore)
		l.triggerThrottle(now, test.maxBackoff)
		require.Equal(t, l.nextBackoff, test.backoffAfter)
		require.Equal(t, l.nextTime, test.timeAfter)
	}
}