ItemElementPresenter extends ElementPresenter<ItemElementView> implements ItemElementView.Presenter { @Override public void updateItem(ItemElementView itemElementView) { propertyPresenter.updateProperties(itemElementView.getItemId()); itemIdExpandablePropertiesMap.get(itemElementView.getItemId()).forEach(expandablePropertyName -> propertyPresenter.updateProperties(expandablePropertyName)); itemElementView.getSaveChange().getStyle().setDisplay(Style.Display.NONE); collectionEditorPresenter.toggleEditingStatus(false); }  @Override LIElement getItemContainer(String itemId, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesValues); @Override void onToggleRowExpansion(ItemElementView itemElementView, boolean isShown); @Override void onEditItem(ItemElementView itemElementView); @Override void onStopEditingItem(ItemElementView itemElementView); @Override void updateItem(ItemElementView itemElementView); @Override void onDeleteItem(ItemElementView itemElementView); @Override Map<String, Map<String, String>> getSimpleItemsProperties(); @Override Map<String, Map<String, Map<String, String>>> getExpandableItemsProperties();  }
@Test public void updateItem() { elementPresenter.updateItem(elementView1Mock); verify(propertyPresenterMock, times(1)).updateProperties(eq(elementView1Mock.getItemId())); for (String expandableProperty : EXPANDABLE_PROPERTIES) { verify(propertyPresenterMock, times(1)).updateProperties(eq(expandableProperty)); } verify(styleMock, times(1)).setDisplay(Style.Display.NONE); verify(collectionPresenterMock, times(1)).toggleEditingStatus(eq(false)); }