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: admission_test.go
    path of file: ./repos/kubernetes/staging/src/k8s.io/apiserver/pkg/server/options
    
    the code of the file until where you have to start completion: /*
Copyright 2017 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
limitations under the License.
*/

package options

import (
	"fmt"
	"io"
	"testing"

	"k8s.io/apimachinery/pkg/util/sets"
	"k8s.io/apiserver/pkg/admission"
)

func TestEnabledPluginNames(t *testing.T) {
	scenarios := []struct {
		expectedPluginNames       []string
		setDefaultOffPlugins      sets.String
		setRecommendedPluginOrder []string
		setEnablePlugins          []string
		setDisablePlugins         []string
		setAdmissionControl       []string
	}{
		// scenario 0: check if a call to enabledPluginNames sets expected values.
		{
			expectedPluginNames: []string{"NamespaceLifecycle", "MutatingAdmissionWebhook", "ValidatingAdmissionPolicy", "ValidatingAdmissionWebhook"},
		},

		// scenario 1: use default off plugins if no specified
		{
			expectedPluginNames:       []string{"pluginB"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString("pluginA", "pluginC", "pluginD"),
		},

		// scenario 2: use default off plugins and with RecommendedPluginOrder
		{
			expectedPluginNames:       []string{"pluginA", "plugin
    
func TestEnabledPluginNames(t *testing.T) {
	scenarios := []struct {
		expectedPluginNames       []string
		setDefaultOffPlugins      sets.String
		setRecommendedPluginOrder []string
		setEnablePlugins          []string
		setDisablePlugins         []string
		setAdmissionControl       []string
	}{
		// scenario 0: check if a call to enabledPluginNames sets expected values.
		{
			expectedPluginNames: []string{"NamespaceLifecycle", "MutatingAdmissionWebhook", "ValidatingAdmissionPolicy", "ValidatingAdmissionWebhook"},
		},

		// scenario 1: use default off plugins if no specified
		{
			expectedPluginNames:       []string{"pluginB"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString("pluginA", "pluginC", "pluginD"),
		},

		// scenario 2: use default off plugins and with RecommendedPluginOrder
		{
			expectedPluginNames:       []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString(),
		},

		// scenario 3: use default off plugins and specified by enable-admission-plugins with RecommendedPluginOrder
		{
			expectedPluginNames:       []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString("pluginC", "pluginD"),
			setEnablePlugins:          []string{"pluginD", "pluginC"},
		},

		// scenario 4: use default off plugins and specified by disable-admission-plugins with RecommendedPluginOrder
		{
			expectedPluginNames:       []string{"pluginB"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString("pluginC", "pluginD"),
			setDisablePlugins:         []string{"pluginA"},
		},

		// scenario 5: use default off plugins and specified by enable-admission-plugins and disable-admission-plugins with RecommendedPluginOrder
		{
			expectedPluginNames:       []string{"pluginA", "pluginC"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString("pluginC", "pluginD"),
			setEnablePlugins:          []string{"pluginC"},
			setDisablePlugins:         []string{"pluginB"},
		},

		// scenario 6: use default off plugins and specified by admission-control with RecommendedPluginOrder
		{
			expectedPluginNames:       []string{"pluginA", "pluginB", "pluginC"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString("pluginD"),
			setAdmissionControl:       []string{"pluginA", "pluginB"},
		},

		// scenario 7: use default off plugins and specified by admission-control with RecommendedPluginOrder
		{
			expectedPluginNames:       []string{"pluginA", "pluginB", "pluginC"},
			setRecommendedPluginOrder: []string{"pluginA", "pluginB", "pluginC", "pluginD"},
			setDefaultOffPlugins:      sets.NewString("pluginC", "pluginD"),
			setAdmissionControl:       []string{"pluginA", "pluginB", "pluginC"},
		},
	}

	// act
	for index, scenario := range scenarios {
		t.Run(fmt.Sprintf("scenario %d", index), func(t *testing.T) {
			target := NewAdmissionOptions()

			if scenario.setDefaultOffPlugins != nil {
				target.DefaultOffPlugins = scenario.setDefaultOffPlugins
			}
			if scenario.setRecommendedPluginOrder != nil {
				target.RecommendedPluginOrder = scenario.setRecommendedPluginOrder
			}
			if scenario.setEnablePlugins != nil {
				target.EnablePlugins = scenario.setEnablePlugins
			}
			if scenario.setDisablePlugins != nil {
				target.DisablePlugins = scenario.setDisablePlugins
			}
			if scenario.setAdmissionControl != nil {
				target.EnablePlugins = scenario.setAdmissionControl
			}

			actualPluginNames := target.enabledPluginNames()

			if len(actualPluginNames) != len(scenario.expectedPluginNames) {
				t.Fatalf("incorrect number of items, got %d, expected = %d", len(actualPluginNames), len(scenario.expectedPluginNames))
			}
			for i := range actualPluginNames {
				if scenario.expectedPluginNames[i] != actualPluginNames[i] {
					t.Errorf("missmatch at index = %d, got = %s, expected = %s", i, actualPluginNames[i], scenario.expectedPluginNames[i])
				}
			}
		})
	}
}