DBFactory and test