Added test cases for object serializer.