Added tests for entities serialization (related to #44)