FactoryTest: fix the unit test