Fixing problem with DataBaseTestCase when creating factory.