CollectionViewImpl extends FocusWidget implements HasCloseCompositeHandler,
                                                               HasSaveEditorHandler,
                                                               CollectionView { @Override public void initListStructure(String key, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesMap, ScenarioSimulationModel.Type type) { listWidget = true; commonInit(type); createLabel.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.createLabelList()); collectionCreationModeLabel.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.collectionListCreation()); collectionCreationCreateLabel.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.createLabelList()); collectionCreationCreateSpan.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.createLabelListDescription()); collectionCreationDefineLabel.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.defineLabelList()); collectionCreationDefineSpan.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.defineLabelListDescription()); addItemButtonLabel.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.addNewListItem()); presenter.initListStructure(key, simplePropertiesMap, expandablePropertiesMap, this); } CollectionViewImpl(); @Override void initListStructure(String key, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesMap, ScenarioSimulationModel.Type type); @Override void initMapStructure(String key, Map<String, String> keyPropertyMap, Map<String, String> valuePropertyMap, ScenarioSimulationModel.Type type); @Override HandlerRegistration addCloseCompositeEventHandler(CloseCompositeEventHandler handler); @Override HandlerRegistration addSaveEditorEventHandler(SaveEditorEventHandler handler); @Override String getValue(); @Override void setValue(String jsonString); @Override boolean isExpressionWidget(); @Override boolean isListWidget(); @Override UListElement getElementsContainer(); @Override HeadingElement getEditorTitle(); @Override SpanElement getPropertyTitle(); @Override String getExpression(); @Override void setExpression(String expressionValue); @EventHandler("createCollectionRadio") void onCreateCollectionClick(ClickEvent clickEvent); @EventHandler("defineCollectionRadio") void onDefineCollectionClick(ClickEvent clickEvent); @EventHandler("closeCollectionEditorButton") void onCloseCollectionEditorButtonClick(ClickEvent clickEvent); @EventHandler("cancelButton") void onCancelButtonClick(ClickEvent clickEvent); @EventHandler("removeButton") void onRemoveButtonClick(ClickEvent clickEvent); @EventHandler("saveButton") void onSaveButtonClick(ClickEvent clickEvent); @EventHandler("addItemButton") void onAddItemButton(ClickEvent clickEvent); @EventHandler("faAngleRight") void onFaAngleRightClick(ClickEvent clickEvent); @Override void toggleRowExpansion(); @Override void updateRowExpansionStatus(boolean isShown); @Override void updateValue(String value); @Override void close(); @Override void setFixedHeight(double value, Style.Unit unit); @Override void enableEditingMode(boolean isEditingMode);  }
@Test public void initListStructure() { collectionEditorViewImplSpy.initListStructure("key", Collections.EMPTY_MAP, Collections.EMPTY_MAP, ScenarioSimulationModel.Type.DMN); verify(collectionEditorViewImplSpy, times(1)).commonInit(eq(ScenarioSimulationModel.Type.DMN)); verify(createLabelMock, atLeast(1)).setInnerText(ScenarioSimulationEditorConstants.INSTANCE.createLabelList()); verify(collectionCreationModeLabelMock, times(1)).setInnerText(ScenarioSimulationEditorConstants.INSTANCE.collectionListCreation()); verify(collectionCreationCreateLabelMock, times(1)).setInnerText(ScenarioSimulationEditorConstants.INSTANCE.createLabelList()); verify(collectionCreationCreateSpanMock, times(1)).setInnerText(ScenarioSimulationEditorConstants.INSTANCE.createLabelListDescription()); verify(collectionCreationDefineLabelMock, times(1)).setInnerText(ScenarioSimulationEditorConstants.INSTANCE.defineLabelList()); verify(collectionCreationDefineSpanMock, times(1)).setInnerText(ScenarioSimulationEditorConstants.INSTANCE.defineLabelListDescription()); verify(collectionPresenterMock, times(1)).initListStructure(eq("key"), eq(Collections.EMPTY_MAP), eq(Collections.EMPTY_MAP), eq(collectionEditorViewImplSpy)); verify(addItemButtonLabelMock, times(1)).setInnerText(ScenarioSimulationEditorConstants.INSTANCE.addNewListItem()); assertTrue(collectionEditorViewImplSpy.listWidget); }