DataSetDefProviderTypeEditor implements IsWidget,
                                                     org.dashbuilder.dataset.client.editor.DataSetDefProviderTypeEditor { @PostConstruct public void init() { view.init(this); final Collection<ImageListEditor<DataSetProviderType>.Entry> entries = getDefaultEntries(); provider.setEntries(entries); view.initWidgets(provider.view); } @Inject  DataSetDefProviderTypeEditor(final HorizImageListEditor<DataSetProviderType> provider,
                                        final Event<DataSetDefCreationRequestEvent> createEvent,
                                        final View view); @PostConstruct void init(); @Override Widget asWidget(); @Override void showErrors(final List<EditorError> errors); @Override HorizImageListEditor<DataSetProviderType> provider(); public View view; }
@Test public void testInit() throws Exception { tested.init(); verify(view, times(1)).init(tested); verify(view, times(1)).initWidgets(any(IsWidget.class)); final ArgumentCaptor<Collection> actualEntriesCaptor = ArgumentCaptor.forClass(Collection.class); verify(provider, times(1)).setEntries(actualEntriesCaptor.capture()); final Collection actualEntries = actualEntriesCaptor.getValue(); assertEquals(4, actualEntries.size()); }