Refactro db test to use the memory tests