* this resulted in getting the previous search results.
*/
public void testSecondSearchBlank() {
String textToSearch = "01234567890123456789";
TextBlockSearchEditor editor = new TextBlockSearchEditor();
BasicTextSearchCriteria criteria = new BasicTextSearchCriteria();
criteria.setTextToMatch("2");
criteria.setCaseSensitive(false);
int matches = editor.searchAllText(textToSearch, 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("2", 2, 3),
new TextBlockSearchEditor.SearchResult("2", 12, 13));
criteria.setTextToMatch("");
criteria.setCaseSensitive(false);
matches = editor.searchAllText(textToSearch, criteria);
assertEquals("Failed to find the correct number of matches", 0, matches); //this tests the matches return result is correct
assertEquals(0, editor.getMatchedResults().size());
}