Added tests for db