Added tests for FactoryGenerator