How to construct a javax.jms.TextMessage in unit tests?
<p>What is the best way to construct a <a href="https://jms-spec.java.net/2.0/apidocs/javax/jms/TextMessage.html" rel="noreferrer">TextMessage</a> from a String in a unit test?</p>

<p>I see only <a href="https://jms-spec.java.net/2.0/apidocs/javax/jms/Session.html#createTextMessage()" rel="noreferrer">Session#createTextMessage(String)</a>, but that requires a session which requires some setup.</p>

<p>The alternative is just to mock the TextMessage, but I thought it is a good practice to avoid mocking data objects.</p>