Added serialization test in test directory.