### Question:
AmqpJmsMessageFactory implements JmsMessageFactory { public AmqpConnection getAmqpConnection() { return this.connection; } 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 testAmqpJmsMessageFactoryAmqpConnection() { AmqpJmsMessageFactory factory = new AmqpJmsMessageFactory(createMockAmqpConnection()); assertNotNull(factory.getAmqpConnection()); }