Fix for storing the database connection in the controller
Add first test for the controller