MessageFactory test updated