OverlayRestParamsPropertyHolder implements RestParamsPropertyHolder { public RestParamProperty removeProperty(String propertyName) { return overlay.containsKey(propertyName) ? overlay.removeProperty(propertyName) : parent.removeProperty(propertyName); } OverlayRestParamsPropertyHolder(RestParamsPropertyHolder parent, RestParamsPropertyHolder overlay); void addParameter(RestParamProperty prop); @Override void setParameterLocation(RestParamProperty parameter, NewRestResourceActionBase.ParamLocation newLocation); RestParamProperty addProperty(String name); void clear(); boolean containsKey(Object key); boolean containsValue(Object value); Set<java.util.Map.Entry<String, TestProperty>> entrySet(); RestParamProperty get(Object key); ModelItem getModelItem(); Map<String, TestProperty> getProperties(); String getPropertiesLabel(); RestParamProperty getProperty(String name); RestParamProperty getPropertyAt(int index); int getPropertyCount(); PropertyExpansion[] getPropertyExpansions(); int getPropertyIndex(String name); String[] getPropertyNames(); String getPropertyValue(String name); boolean hasProperty(String name); boolean isEmpty(); Set<String> keySet(); void moveProperty(String propertyName, int targetIndex); TestProperty put(String key, TestProperty value); void putAll(Map<? extends String, ? extends TestProperty> m); TestProperty remove(Object key); RestParamProperty removeProperty(String propertyName); boolean renameProperty(String name, String newName); void resetValues(); void saveTo(Properties props); void setPropertiesLabel(String propertiesLabel); void setPropertyValue(String name, String value); int size(); Collection<TestProperty> values(); void addTestPropertyListener(TestPropertyListener listener); void removeTestPropertyListener(TestPropertyListener listener); List<TestProperty> getPropertyList();  }
@Test public void testRemoveProperty() throws Exception { assertNotNull(propertyHolder.removeProperty("paramOverLay")); assertNull(propertyHolder.removeProperty("paramOverLay")); assertNotNull(propertyHolder.removeProperty("paramParent")); assertNull(propertyHolder.removeProperty("paramParent")); }