add unit tests for deserializer