Renamed private methods
Added test class
Handling invalid serialization data