unit test for the whole serialization process

Interface Input DataInput anf DataOutput need to be revised, but I left them unchanged
That's something PickleFormat should worry about, but I see you point, we can handle it like this temporarily.