Please, check the factory here: `ensureFactoryIsNotNull(factory)`.