Finished up database tests

Change-Id: I5f57d4937c475f97b8d5d166a8d3e250b086b99e