Improved testing of serialization.