unit test for the whole serialization process

Interface Input DataInput anf DataOutput need to be revised, but I left them unchanged
Yes, for current implementation, we should read class info from DataInput, as we're trying to implement the first ser/deser i mentioned before.