void () { doTest(new MockIntroduceVariableHandler("sum", true, true, false, "int") { @Override protected void showErrorMessage(Project project, Editor editor, String message) { assertEquals("Cannot perform refactoring.\nExtracting selected expression would change the semantic of the whole expression.", message); } }); }