### Question:
PeliasSearchView extends SearchView implements SearchView.OnQueryTextListener { @Override public boolean onQueryTextSubmit(String query) { if (pelias != null) { if (searchSubmitListener == null || searchSubmitListener.searchOnSearchKeySubmit()) { pelias.search(query, callback); } } storeSavedSearch(query, null); if (onSubmitListener != null) { onSubmitListener.onSubmit(); } if (searchSubmitListener != null) { checkHideAutocompleteList = true; } textSubmitted = true; onFocusChange(this, false); resetCursorPosition(); return false; } PeliasSearchView(Context context);  PeliasSearchView(Context context, AttributeSet attrs); void setSuggestFilter(SuggestFilter suggestFilter); void setAutoCompleteListView(final ListView listView); void disableAutoKeyboardShow(); void enableAutoKeyboardShow(); void setSearchSubmitListener(SearchSubmitListener listener); void setDismissKeyboardOnListScroll(boolean dismissOnScroll); @Override boolean onQueryTextSubmit(String query); @Override boolean onQueryTextChange(String text); void disableAutoComplete(); void setSavedSearch(SavedSearch savedSearch); void loadSavedSearches(); void setPelias(Pelias pelias); void setCallback(Callback<Result> callback); void setOnPeliasFocusChangeListener(OnFocusChangeListener onPeliasFocusChangeListener); void setOnSubmitListener(OnSubmitListener onSubmitListener); void setRecentSearchIconResourceId(int recentSearchIconResourceId); void setAutoCompleteIconResourceId(int autoCompleteIconResourceId); void setOnBackPressListener(OnBackPressListener onBackPressListener); void setCacheSearchResults(boolean cacheResults); boolean cacheSearchResults(); @Override void onActionViewCollapsed(); static final String TAG; }### Answer:
@Test public void onQueryTextSubmit_shouldNotClearFocus() throws Exception { peliasSearchView.requestFocus(); peliasSearchView.onQueryTextSubmit("query"); assertThat(peliasSearchView.isFocused()).isTrue(); }