tests for serializing