Merge pull request #1566 from alex/reduce-duplication

Reduce duplication in the serialization tests -- refs #1564