ElasticSearchDataSetDefAttributesEditor implements IsWidget, org.dashbuilder.dataset.client.editor.ElasticSearchDataSetDefAttributesEditor { @PostConstruct public void init() { view.init(this); view.initWidgets(serverURL.view, clusterName.view, index.view, type.view); serverURL.addHelpContent(DataSetEditorConstants.INSTANCE.el_server_url(), DataSetEditorConstants.INSTANCE.el_server_url_description(), Placement.BOTTOM); clusterName.addHelpContent(DataSetEditorConstants.INSTANCE.el_cluster_name(), DataSetEditorConstants.INSTANCE.el_cluster_name_description(), Placement.BOTTOM); index.addHelpContent(DataSetEditorConstants.INSTANCE.el_index(), DataSetEditorConstants.INSTANCE.el_index_description(), Placement.BOTTOM); type.addHelpContent(DataSetEditorConstants.INSTANCE.el_type(), DataSetEditorConstants.INSTANCE.el_type_description(), Placement.BOTTOM); } @Inject  ElasticSearchDataSetDefAttributesEditor(final ValueBoxEditor<String> serverURL,
                                                   final ValueBoxEditor<String> clusterName,
                                                   final ValueBoxEditor<String> index,
                                                   final ValueBoxEditor<String> type,
                                                   final View view); @PostConstruct void init(); @Override Widget asWidget(); @Override ValueBoxEditor<String> serverURL(); @Override ValueBoxEditor<String> clusterName(); @Override ValueBoxEditor<String> index(); @Override ValueBoxEditor<String> type(); public View view; }
@Test public void testInit() { presenter.init(); verify(view, times(1)).init(presenter); verify(view, times(1)).initWidgets(any(ValueBoxEditor.View.class), any(ValueBoxEditor.View.class), any(ValueBoxEditor.View.class), any(ValueBoxEditor.View.class)); verify(serverURL, times(1)).addHelpContent(anyString(), anyString(), any(Placement.class)); verify(clusterName, times(1)).addHelpContent(anyString(), anyString(), any(Placement.class)); verify(index, times(1)).addHelpContent(anyString(), anyString(), any(Placement.class)); verify(type, times(1)).addHelpContent(anyString(), anyString(), any(Placement.class)); }