test serialization, clear