Improved custom property value factory support.
Added tests to verify the contract.