Add some serialization unittests