### Question:
DataTypeSearchBar { public void refresh() { search(getCurrentSearch()); } @Inject  DataTypeSearchBar(final View view,
                             final DataTypeSearchEngine searchEngine,
                             final DataTypeList dataTypeList); HTMLElement getElement(); void refresh(); void reset(); boolean isEnabled();  }### Answer:
@Test public void testRefresh() { final String currentSearch = "currentSearch"; doReturn(currentSearch).when(searchBar).getCurrentSearch(); searchBar.refresh(); verify(searchBar).search(currentSearch); }