Add tests for new Serialize/Deserialize functions.