Examples of StubTextMessage


Examples of org.springframework.jms.StubTextMessage

  public void attemptToWriteDisallowedReplyToPropertyIsNotFatal() throws JMSException {
    Message<String> message = initBuilder()
        .setHeader(JmsHeaders.REPLY_TO, new Destination() {})
        .setHeader("foo", "bar")
        .build();
    javax.jms.Message jmsMessage = new StubTextMessage() {
      @Override
      public void setJMSReplyTo(Destination replyTo) throws JMSException {
        throw new JMSException("illegal property");
      }
    };
    mapper.fromHeaders(message.getHeaders(), jmsMessage);
    assertNull(jmsMessage.getJMSReplyTo());
    assertNotNull(jmsMessage.getStringProperty("foo"));
    assertEquals("bar", jmsMessage.getStringProperty("foo"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.