mongodb adapter test refactoring