Add some unit tests for routines that transact with MongoDB