protected static void replaceExpressionWithNegatedExpressionString(@NotNull String newExpression, @NotNull GrExpression expression) throws IncorrectOperationException {
    final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(expression.getProject());

    GrExpression expressionToReplace = expression;
    final String expString;
    if (BoolUtils.isNegated(expression)) {
      expressionToReplace = BoolUtils.findNegation(expression);
      expString = newExpression;
    }
    else {
      expString = "!(" + newExpression + ')';
    }
    final GrExpression newCall = factory.createExpressionFromText(expString, expression.getContext());
    assert expressionToReplace != null;
    expressionToReplace.replaceWithExpression(newCall, true);
  }
protected static void replaceExpressionWithNegatedExpressionString(@NotNull String newExpression, @NotNull GrExpression expression)