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: plugin_test.go
    path of file: ./repos/kubernetes/pkg/kubelet/cm/dra/plugin
    
    the code of the file until where you have to start completion: /*
Copyright 2023 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the L
    
func TestRegistrationHandler_ValidatePlugin(t *testing.T) {
	newRegistrationHandler := func() *RegistrationHandler {
		return NewRegistrationHandler(nil, "worker")
	}

	for _, test := range []struct {
		description string
		handler     func() *RegistrationHandler
		pluginName  string
		endpoint    string
		versions    []string
		shouldError bool
	}{
		{
			description: "no versions provided",
			handler:     newRegistrationHandler,
			shouldError: true,
		},
		{
			description: "unsupported version",
			handler:     newRegistrationHandler,
			versions:    []string{"v2.0.0"},
			shouldError: true,
		},
		{
			description: "plugin already registered with a higher supported version",
			handler: func() *RegistrationHandler {
				handler := newRegistrationHandler()
				if err := handler.RegisterPlugin("this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide", "", []string{"v1.1.0"}); err != nil {
					t.Fatal(err)
				}
				return handler
			},
			pluginName:  "this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide",
			versions:    []string{"v1.0.0"},
			shouldError: true,
		},
		{
			description: "should validate the plugin",
			handler:     newRegistrationHandler,
			pluginName:  "this-is-a-dummy-plugin-with-a-long-name-so-it-doesnt-collide",
			versions:    []string{"v1.3.0"},
		},
	} {
		t.Run(test.description, func(t *testing.T) {
			handler := test.handler()
			err := handler.ValidatePlugin(test.pluginName, test.endpoint, test.versions)
			if test.shouldError {
				assert.Error(t, err)
			} else {
				assert.Nil(t, err)
			}
		})
	}

	t.Cleanup(func() {
		handler := newRegistrationHandler()
		handler.DeRegisterPlugin("this-plugin-already-exists-and-has-a-long-name-so-it-doesnt-collide")
		handler.DeRegisterPlugin("this-is-a-dummy-plugin-with-a-long-name-so-it-doesnt-collide")
	})
}