WDSObject implements IObject, IObjectWrapper { @Override public Object getValue(final IFieldName name) throws ReadValueException, InvalidArgumentException { if (null == name) { throw new InvalidArgumentException("Name parameter should not be null."); } return fieldSet.read(initIObject, name); } 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 checkGetValueMethodOnNullFieldName() throws Exception { IObject wObj = new WDSObject((IObject) null); wObj.getValue(null); fail(); }
@Test (expected = ReadValueException.class) public void checkGetValueMethodOnWrongArgument() throws Exception { IObject wObj = new WDSObject((IObject) null); wObj.getValue(new FieldName("undefinedFieldName")); fail(); }