Added unit test for serialization (unfinished)