Add Test for factory magic