Automating setup of db. Fixing time test.