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: warning_test.go
    path of file: ./repos/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/filters
    
    the code of the file until where you have to start completion: /*
Copyright 2020 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitatio
    
func TestTruncation(t *testing.T) {
	originalTotalRunes, originalItemRunes := truncateAtTotalRunes, truncateItemRunes
	truncateAtTotalRunes, truncateItemRunes = 25, 5
	defer func() {
		truncateAtTotalRunes, truncateItemRunes = originalTotalRunes, originalItemRunes
	}()

	responseRecorder := httptest.NewRecorder()
	warningRecorder := &recorder{writer: responseRecorder}

	// add items longer than the individual length
	warningRecorder.AddWarning("", "aaaaaaaaaa")  // long item
	warningRecorder.AddWarning("-", "aaaaaaaaaa") // duplicate item
	warningRecorder.AddWarning("", "bb")          // short item
	warningRecorder.AddWarning("", "ccc")         // short item
	warningRecorder.AddWarning("", "Iñtërnâtiô")  // long item
	// check they are preserved
	if e, a := []string{`299 - "aaaaaaaaaa"`, `299 - "bb"`, `299 - "ccc"`, `299 - "Iñtërnâtiô"`}, responseRecorder.Header()["Warning"]; !reflect.DeepEqual(e, a) {
		t.Errorf("expected\n%#v\ngot\n%#v", e, a)
	}
	// add an item that exceeds the length and triggers truncation, reducing existing items to 15 runes
	warningRecorder.AddWarning("", "e")          // triggering item, 16 total
	warningRecorder.AddWarning("", "ffffffffff") // long item to get truncated, 21 total
	warningRecorder.AddWarning("", "ffffffffff") // duplicate item
	warningRecorder.AddWarning("", "gggggggggg") // item to get truncated, 26 total
	warningRecorder.AddWarning("", "h")          // item to get ignored since we're over our limit
	// check that existing items are truncated, and order preserved
	if e, a := []string{`299 - "aaaaa"`, `299 - "bb"`, `299 - "ccc"`, `299 - "Iñtër"`, `299 - "e"`, `299 - "fffff"`, `299 - "ggggg"`}, responseRecorder.Header()["Warning"]; !reflect.DeepEqual(e, a) {
		t.Errorf("expected\n%#v\ngot\n%#v", e, a)
	}
}