ItemEditingBoxPresenter extends EditingBoxPresenter implements ItemEditingBox.Presenter { @Override public void save() { Map<String, String> simplePropertiesValues = propertyPresenter.updateProperties(VALUE); Map<String, Map<String, String>> expandablePropertiesValues = new HashMap<>(); for (String nestedPropertyName : nestedPropertiesNamesList) { expandablePropertiesValues.put(nestedPropertyName, propertyPresenter.updateProperties(nestedPropertyName)); } collectionEditorPresenter.addListItem(simplePropertiesValues, expandablePropertiesValues); }  @Override LIElement getEditingBox(String key, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesMap); @Override void save();  }
@Test public void save() { editingBoxPresenter.save(); verify(propertyPresenterMock, times(1)).updateProperties(LOWER_CASE_VALUE); verify(collectionPresenterMock, times(1)).addListItem(anyMap(), anyMap()); }