WDSObject implements IObject, IObjectWrapper { @Override public void setValue(final IFieldName name, final Object value) throws ChangeValueException, InvalidArgumentException { if (null == name) { throw new InvalidArgumentException("Name parameter should not be null."); } fieldSet.write(initIObject, name, value); } WDSObject(final IObject wrapperConfig);  WDSObject(final WDSObjectFieldSet fieldSet); @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(); @Override void init(final IObject environment); @Override IObject getEnvironmentIObject(final IFieldName fieldName);  }
@Test (expected = InvalidArgumentException.class) public void checkSetValueMethodOnNullFieldName() throws Exception { IObject wObj = new WDSObject((IObject) null); wObj.setValue(null, 1); fail(); }
@Test (expected = ChangeValueException.class) public void checkSetValueMethodOnWrongArgument() throws Exception { IObject wObj = new WDSObject((IObject) null); wObj.setValue(new FieldName("undefinedFieldName"), 1); fail(); }