Complete testing database.init() with mock objects