Added unit tests for JSON serialization and deserialization