Refactoring message deserialization tests.