Add test for singleton serialization.