void () { try { doTest("val"); fail("Should be impossible to rename"); } catch (CommonRefactoringUtil.RefactoringErrorHintException e) { assertEquals("Cannot perform refactoring.\n" + "This element cannot be renamed", e.getMessage()); } }