Add Mage class to factory