fix mongo db issue with tests & add collection base class