Start refactoring database tests