unit test for the whole serialization process

Interface Input DataInput anf DataOutput need to be revised, but I left them unchanged
I think we may share several information between serialize and desrialize, at least some configuration in the future i suppose, so we can keep it no-static temporarily and verified in the future.