def METHOD_NAME(self, mock):
    instance = mock.return_value
    instance.wait.return_value = 0
    wrong_api_version = 'client.authentication.k8s.io/v1'
    output = """
    {
        "apiVersion": "%s",
        "kind": "ExecCredential",
        "status": {
            "token": "dummy"
        }
    }
    """ % wrong_api_version
    instance.communicate.return_value = (output, '')
    with self.assertRaises(ConfigException) as context:
        ep = ExecProvider(self.input_ok, None)
        ep.run()
    self.assertIn(
        'exec: plugin api version %s does not match' %
        wrong_api_version,
        context.exception.args[0])