eskatos/qi4j-sdk — comment on commit 7cd29cd53ee416f50bb8839a488ecadebe292e57
File:  line 0
By niclash:

This is not a bug, or should I say that the ArrayList can NOT be set as you do, since that will circumvent immutability for the Value.

The proper testcase is something like this;
````java
@Test
public void testInner()
{
ValueBuilder innerBuilder = module.newValueBuilder( InnerValue.class );
InnerValue inner = innerBuilder.prototype();
List list = inner.listProp().get();
list.add( "Qi4j" );
inner.mapProp().set( new HashMap() );
inner = innerBuilder.newInstance();
// If we reach this point, value creation went well
try
{
inner.listProp().get().add( "Should be immutable now!" ); // Must not be allowed
fail( "List is not immutable!");
} catch( Exception e )
{
// expected
e.printStackTrace();
}

}
```