Added message factory test