fix model factory test case