Unit tests for sqldatabasedeferred