### Question:
AmqpJmsMessageFactory implements JmsMessageFactory { @Override public JmsMessage createMessage() throws JMSException { AmqpJmsMessageFacade facade = new AmqpJmsMessageFacade(); 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 testCreateMessage() throws JMSException { AmqpJmsMessageFactory factory = new AmqpJmsMessageFactory(createMockAmqpConnection()); JmsMessage message = factory.createMessage(); JmsMessageFacade facade = message.getFacade(); assertTrue(facade instanceof AmqpJmsMessageFacade); AmqpJmsMessageFacade amqpMessage = (AmqpJmsMessageFacade) facade; assertEquals(JMS_MESSAGE, amqpMessage.getJmsMsgType()); }