func TestGetValidatingWebhookConfig(t *testing.T) { … } type mockCreateValidatingWebhookAccessor … func (mock *mockCreateValidatingWebhookAccessor) calledNTimes() int { … } func (mock *mockCreateValidatingWebhookAccessor) resetCounter() { … } func (mock *mockCreateValidatingWebhookAccessor) incrementCounter() { … } func (mock *mockCreateValidatingWebhookAccessor) fn(uid string, configurationName string, h *v1.ValidatingWebhook) webhook.WebhookAccessor { … } func configurationTotalWebhooks(configurations []*v1.ValidatingWebhookConfiguration) int { … } func TestGetValidatingWebhookConfigSmartReload(t *testing.T) { … }