TextBlockSearchEditor editor = new TextBlockSearchEditor();
BasicTextSearchCriteria criteria = new BasicTextSearchCriteria();
criteria.setTextToMatch("error");
criteria.setCaseSensitive(false);
int matches = editor.searchAllText(TEXT_1, criteria);
assertEquals("Failed to find the correct number of matches", 2, matches); //this tests the matches return result is correct
TestUtility.assertListContents(editor.getMatchedResults(), new TextBlockSearchEditor.SearchResult("error", 10, 15),
new TextBlockSearchEditor.SearchResult("ErRor", 42, 47));