### Question:
AmqpJmsMessageFactory implements JmsMessageFactory { @Override public JmsStreamMessage createStreamMessage() throws JMSException { AmqpJmsStreamMessageFacade facade = new AmqpJmsStreamMessageFacade(); facade.initialize(connection); return facade.asJmsMessage(); } AmqpJmsMessageFactory(AmqpConnection connection); AmqpConnection getAmqpConnection(); @Override JmsMessage createMessage(); @Override JmsTextMessage createTextMessage(); @Override JmsTextMessage createTextMessage(String payload); @Override JmsBytesMessage createBytesMessage(); @Override JmsMapMessage createMapMessage(); @Override JmsStreamMessage createStreamMessage(); @Override JmsObjectMessage createObjectMessage(); @Override JmsObjectMessage createObjectMessage(Serializable payload);  }### Answer:
@Test public void testCreateStreamMessage() throws JMSException { AmqpJmsMessageFactory factory = new AmqpJmsMessageFactory(createMockAmqpConnection()); JmsStreamMessage message = factory.createStreamMessage(); JmsStreamMessageFacade facade = (JmsStreamMessageFacade) message.getFacade(); assertTrue(facade instanceof AmqpJmsStreamMessageFacade); AmqpJmsStreamMessageFacade amqpMessage = (AmqpJmsStreamMessageFacade) facade; assertEquals(JMS_STREAM_MESSAGE, amqpMessage.getJmsMsgType()); assertFalse(amqpMessage.hasNext()); }