def METHOD_NAME(self):
    """Test reactions to wrong gradient settings.."""
    estimator = Estimator()
    gradient = LinCombEstimatorGradient(estimator, derivative_type=DerivativeType.IMAG)
    with self.assertWarns(Warning):
        var_principle = ImaginaryMcLachlanPrinciple(gradient=gradient)
    np.testing.assert_equal(var_principle.gradient._derivative_type, DerivativeType.REAL)