add a unit test to verify working of manual serialization