private AnotherValue createAnotherValue( String val1, String val2 ) { ValueBuilder<AnotherValue> valueBuilder = module.newValueBuilder( AnotherValue.class ); valueBuilder.prototype().val1().set( val1 ); valueBuilder.prototypeFor( AnotherValueInternalState.class ).val2().set( val2 ); return valueBuilder.newInstance(); }