def METHOD_NAME(self):
    # Tests ask-and-tell related error handling.
    r, x, s, b = self.problem()
    opt = method(x, boundaries=b)
    # Stop called when not running
    self.assertFalse(opt.stop())
    # Best position and score called before run
    self.assertEqual(list(opt.x_best()), list(x))
    self.assertEqual(list(opt.x_guessed()), list(x))
    self.assertEqual(opt.f_best(), np.inf)
    self.assertEqual(opt.f_guessed(), np.inf)
    # Tell before ask
    self.assertRaisesRegex(
        Exception, r'ask\(\) not called before tell\(\)', opt.tell, 5)
    # Best position and score called after run
    opt.tell([r(p) for p in opt.ask()])
    self.assertNotEqual(list(opt.x_best()), list(x))
    self.assertNotEqual(list(opt.x_guessed()), list(x))
    self.assertNotEqual(opt.f_best(), np.inf)
    self.assertNotEqual(opt.f_guessed(), np.inf)