assert is added to the hasMessageWithText method