def METHOD_NAME(self, mock):
    instance = mock.return_value
    instance.wait.return_value = 0
    outputs = [
        """
        {
            "kind": "ExecCredential",
            "status": {
                "token": "dummy"
            }
        }
        """, """
        {
            "apiVersion": "client.authentication.k8s.io/v1beta1",
            "status": {
                "token": "dummy"
            }
        }
        """, """
        {
            "apiVersion": "client.authentication.k8s.io/v1beta1",
            "kind": "ExecCredential"
        }
        """
    ]
    for output in outputs:
        instance.communicate.return_value = (output, '')
        with self.assertRaises(ConfigException) as context:
            ep = ExecProvider(self.input_ok, None)
            ep.run()
        self.assertIn('exec: malformed response. missing key',
                      context.exception.args[0])