test coverage for factory