void () { configureByFile("beforeRejectIntroduceFieldFromExprInThisCall.java"); try { performRefactoring(BaseExpressionToFieldHandler.InitializationPlace.IN_FIELD_DECLARATION, false); fail("Should not proceed"); } catch (CommonRefactoringUtil.RefactoringErrorHintException e) { assertEquals("Cannot perform refactoring.\nInvalid expression context.", e.getMessage()); } }