Some DB repository test fixes