Added more unittests and fixed a bug in id assignment of IdentifiedDataS...

...erializable of aggregations