DiskResourceSearchField extends TriggerField<String> implements HasExpandHandlers,
                                                                             HasCollapseHandlers,
                                                                             SaveDiskResourceQueryClickedEvent.HasSaveDiskResourceQueryClickedEventHandlers,
                                                                             FolderSelectionEvent.FolderSelectionEventHandler,
                                                                             HasSubmitDiskResourceQueryEventHandlers,
                                                                             SubmitDiskResourceQueryEventHandler,
                                                                             SubmitTextSearchEventHandler,
                                                                             SavedSearchDeletedEvent.SavedSearchDeletedEventHandler { @Override public void onSubmitTextSearch(SubmitTextSearchEvent event) { finishEditing(); } @Inject  DiskResourceSearchField(final DiskResourceSearchCell searchCell); @Override HandlerRegistration addCollapseHandler(CollapseHandler handler); @Override HandlerRegistration addExpandHandler(ExpandHandler handler); @Override HandlerRegistration addSaveDiskResourceQueryClickedEventHandler(SaveDiskResourceQueryClickedEvent.SaveDiskResourceQueryClickedEventHandler handler); @Override HandlerRegistration addSubmitDiskResourceQueryEventHandler(SubmitDiskResourceQueryEventHandler handler); @Override void onFolderSelected(FolderSelectionEvent event); @Override void onSavedSearchDeleted(SavedSearchDeletedEvent event); void clearSearch(); void edit(DiskResourceQueryTemplate queryTemplate); @Override DiskResourceSearchCell getCell(); @Override void doSubmitDiskResourceQuery(SubmitDiskResourceQueryEvent event); @Override void onSubmitTextSearch(SubmitTextSearchEvent event);  }
@Test public void testOnSubmitTextSearch() { DiskResourceSearchField spy = spy(new DiskResourceSearchField(searchCellMock)); spy.onSubmitTextSearch(any(SubmitTextSearchEvent.class)); verify(spy).finishEditing(); }