Fix unit test with a mock mongo driver