db test code