KeyValueElementPresenter extends ElementPresenter<KeyValueElementView> implements KeyValueElementView.Presenter { @Override public void updateItem(KeyValueElementView keyValueElementView) { List<String> keyValueIds = getKeyValueIds( keyValueElementView.getItemId()); keyValueIds.forEach(id -> propertyPresenter.updateProperties(id)); keyValueElementView.getSaveChange().getStyle().setDisplay(Style.Display.NONE); toggleEditingStatus(false); collectionEditorPresenter.toggleEditingStatus(false); }  @Override LIElement getKeyValueContainer(String itemId, Map<String, String> keyPropertiesValues, Map<String, String> valuePropertiesValues); @Override void onToggleRowExpansion(KeyValueElementView keyValueElementView, boolean isShown); @Override void onEditItem(KeyValueElementView keyValueElementView); @Override void onStopEditingItem(KeyValueElementView keyValueElementView); @Override void onDeleteItem(KeyValueElementView keyValueElementView); @Override void updateItem(KeyValueElementView keyValueElementView); @Override Map<Map<String, String>, Map<String, String>> getItemsProperties();  }
@Test public void updateItem() { elementPresenter.updateItem(elementView1Mock); verify(propertyPresenterMock, times(2)).updateProperties(anyString()); verify(styleMock, times(1)).setDisplay(Style.Display.NONE); verify(collectionPresenterMock, times(1)).toggleEditingStatus(eq(false)); }