void (String newName, String message) { try { doTest(newName, true); fail(message); } catch (CommonRefactoringUtil.RefactoringErrorHintException expectedException) { assertEquals(message, expectedException.getMessage()); } }