ItemEditingBoxPresenter extends EditingBoxPresenter implements ItemEditingBox.Presenter { @Override public LIElement getEditingBox(String key, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesMap) { String propertyName = key.substring(key.lastIndexOf("#") + 1); final ItemEditingBox listEditingBox = viewsProvider.getItemEditingBox(); listEditingBox.init(this); listEditingBox.setKey(key); listEditingBox.getEditingBoxTitle().setInnerText("Edit " + propertyName); nestedPropertiesNamesList.clear(); for (Map.Entry<String, String> entry : simplePropertiesMap.entrySet()) { String propertyKey = entry.getKey(); listEditingBox.getPropertiesContainer().appendChild(propertyPresenter.getEditingPropertyFields(VALUE, propertyKey, "")); } for (Map.Entry<String, Map<String, String>> entry : expandablePropertiesMap.entrySet()) { String nestedPropertyName = entry.getKey(); String nestedPropertyKey = key + "#" + propertyName; addExpandableItemEditingBox(listEditingBox, entry.getValue(), nestedPropertyKey, nestedPropertyName); } return listEditingBox.getEditingBox(); }  @Override LIElement getEditingBox(String key, Map<String, String> simplePropertiesMap, Map<String, Map<String, String>> expandablePropertiesMap); @Override void save();  }
@Test public void getEditingBox() { ((ItemEditingBoxPresenter)editingBoxPresenter).getEditingBox(TEST_KEY, TEST_INSTANCE_PROPERTY_MAP, new HashMap<>()); verify(viewsProviderMock, times(1)).getItemEditingBox(); verify(listEditingBoxMock, times(1)).init(((ItemEditingBoxPresenter)editingBoxPresenter)); verify(listEditingBoxMock, times(1)).setKey(TEST_KEY); verify(editingBoxTitleMock, times(1)).setInnerText("Edit " + TEST_PROPERTYNAME); verify(listEditingBoxMock, times(1)).getEditingBox(); }