Allow integration testing with mocked Mongo

This fixes #77.