fix factory test