Fixes default values for immutable pojos

Also adds test for this case