Refactored provider in order to prepare it for the mongodbMock
Refactored tests