Refactored tests to allow checking of Mongo persistence+backend.