Added tests for db backend.