DSObject implements IObject { @Override public void deleteField(final IFieldName name) throws DeleteValueException, InvalidArgumentException { if (null == name) { throw new InvalidArgumentException("Name parameter should not be null."); } body.remove(name); } DSObject(final Map<IFieldName, Object> objectEntries);  DSObject(final String body);  DSObject(); @Override Object getValue(final IFieldName name); @Override void setValue(final IFieldName name, final Object value); @Override void deleteField(final IFieldName name); @Override T serialize(); @Override Iterator<Map.Entry<IFieldName, Object>> iterator();  }
@Test (expected = InvalidArgumentException.class) public void checkExceptionOnDeleteValue() throws Exception { (new DSObject()).deleteField(null); fail(); }