ticket:3 Added tests for db