void () { configureFromText("<caret> aba"); initFind(); myFindModel.setRegularExpressions(true); myFindModel.setStringToFind("a"); myFindModel.setStringToReplace("c$"); myFindModel.setReplaceState(true); try { myLivePreviewController.performReplace(); fail("There should be an exception, " + FindManager.MalformedReplacementStringException.class); } catch (FindManager.MalformedReplacementStringException e) { //ignore } }