void () { String origText = "first foo\n<selection>foo bar baz\nbaz bar foo</selection>\nlast foo"; init(origText); initReplace(); EditorSearchSession session = getEditorSearchComponent(); FindModel model = session.getFindModel(); assertFalse(model.isGlobal()); assertEquals("", model.getStringToFind()); model.setGlobal(true); assertEquals("foo bar baz\nbaz bar foo", model.getStringToFind()); model.setGlobal(false); assertEquals("", model.getStringToFind()); }