added test for serialization (but not validation)