test writeObject and readObject(the same reference).

Signed-off-by: Flycoding <Flycoding@yeah.net>