test to deserialize immutable object