Added Testcase
Fixed serialization