object factory test