addded unit-tests for serialization