Add more tests for db package