add test for binary serialization.