Refacto mongo test
Use dependencies for test