DmrModelObject extends DmrModelValue implements ModelObject { @Override public ModelValue remove(String name) { if (!value.hasDefined(name)) return null; return asValue(value.remove(name)); } DmrModelObject();   DmrModelObject(final ModelNode value); @Override Model get(String name); @Override Model get(String... names); @Override T get(String name, Class<T> valueType); ModelObject set(String name, String value); ModelObject set(String name, int value); @Override ModelObject set(String name, long value); @Override ModelObject set(String name, double value); @Override ModelObject set(String name, BigInteger value); @Override ModelObject set(String name, BigDecimal value); @Override ModelObject set(String name, boolean value); @Override ModelObject set(String name, PathAddress value); @Override boolean has(String name); @Override boolean hasDefined(String name); @Override ModelValue remove(String name); @Override T remove(String name, Class<T> valueType); @Override Set<String> getNames();  }
@Test public void testRemove() { assertNull(modelObject().remove("foo")); ModelObject model = modelObject(); model.set("foo", "bar"); ModelString string = model.get("foo", ModelString.class); assertEquals("bar", string.getValue()); }