void () { String TEXT_MAIN = "XXXX string str"; String TEXT_TAIL = "ing XXXX"; String STR_TO_FIND = "string"; SearchTaskOptions options; FrameSearcher frameSearcher; options = new SearchTaskOptions(); options.setStringToFind(STR_TO_FIND); options.setContextOneSideLength(0); frameSearcher = new FrameSearcher(options, new MockSmartStringSearcher()); frameSearcher.setFrame(100, ' ', TEXT_MAIN, TEXT_TAIL, ' '); ArrayList<SearchResult> allMatchesAtFrame = frameSearcher.findAllMatchesAtFrame(); assertArrayEquals( new Object[]{ new SearchResult( 100, 5, 100, 11, ELLIPSIS + "", STR_TO_FIND, "" + ELLIPSIS), new SearchResult( 100, 12, 101, 3, ELLIPSIS + "", STR_TO_FIND, "" + ELLIPSIS), }, allMatchesAtFrame.toArray()); }