void () { try { doTest("temp", true, false, false, ""); } catch (RuntimeException e) { assertEquals("Error message:" + RefactoringBundle.message("cannot.perform.refactoring") + "\n" + JavaRefactoringBundle.message("selected.expression.introduces.pattern.variable", "s"), e.getMessage()); return; } fail("Should not be able to perform refactoring"); }