Reset factory in unit tests that use Database