def METHOD_NAME(self, mock_client):
    """"Check if it fails when an error is sent by the server"""
    error = {
        'message': RM_NOT_FOUND_ERROR,
        'extensions': {
            'code': 9
        }
    }
    responses = [
        SortingHatClientError(error['message'], errors=[error])
    ]
    client = MockClient(responses)
    mock_client.return_value = client
    runner = click.testing.CliRunner(mix_stderr=False)
    params = ['FFFFFFFFFFFFFFF']
    result = runner.invoke(rm, params, obj=mock_client)
    expected = RM_CMD_OP.format('FFFFFFFFFFFFFFF')
    self.assertEqual(len(client.ops), 1)
    self.assertEqual(str(client.ops[0]), expected)
    expected_err = "Error: " + RM_NOT_FOUND_ERROR + '\n'
    self.assertEqual(result.stderr, expected_err)
    self.assertEqual(result.exit_code, 9)