// now make the actual call to index items
view.addDisplayNamesToSearchIndex(sib, items);
// make and index with sib
SearchIndex index = sib.make();
// now make sure we can fetch item1 from the index
List<SearchItem> result = new ArrayList<SearchItem>();
index.find(displayName1, result);
Assert.assertEquals(1, result.size());
SearchItem actual = result.get(0);
Assert.assertEquals(actual.getSearchName(), item1.getDisplayName());
Assert.assertEquals(actual.getSearchUrl(), item1.getSearchUrl());
// clear the result array for the next search result to test
result.clear();
// make sure we can fetch item 2 from the index
index.find(displayName2, result);
Assert.assertEquals(1, result.size());
actual = result.get(0);
Assert.assertEquals(actual.getSearchName(), item2.getDisplayName());
Assert.assertEquals(actual.getSearchUrl(), item2.getSearchUrl());
}