Serialize object test