test for serializing primitive types