}
}
public void testMoveSelectionUpAndDown() {
SuggestBox box = new SuggestBox();
SuggestionDisplay display = box.getSuggestionDisplay();
SuggestOracle oracle = box.getSuggestOracle();
// Show some suggestions.
List<Suggestion> suggestions = createSuggestions("test0", "test1", "test2",
"test3");
display.showSuggestions(box, suggestions, false, false, NULL_CALLBACK);
assertNull(display.getCurrentSelection());
display.moveSelectionDown();
assertEquals(suggestions.get(0), display.getCurrentSelection());
display.moveSelectionDown();
assertEquals(suggestions.get(1), display.getCurrentSelection());
display.moveSelectionDown();
assertEquals(suggestions.get(2), display.getCurrentSelection());
display.moveSelectionUp();
assertEquals(suggestions.get(1), display.getCurrentSelection());
display.moveSelectionUp();
assertEquals(suggestions.get(0), display.getCurrentSelection());
}