ticket:3 Added tests for db
ticket:3 Merge commit Added db tests for middleware