add mocking helper for mongo and fix broken test