### Question:
AmqpJmsMessageFactory implements JmsMessageFactory { @Override public JmsBytesMessage createBytesMessage() throws JMSException { AmqpJmsBytesMessageFacade facade = new AmqpJmsBytesMessageFacade(); 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 testCreateBytesMessage() throws JMSException { AmqpJmsMessageFactory factory = new AmqpJmsMessageFactory(createMockAmqpConnection()); JmsBytesMessage message = factory.createBytesMessage(); JmsBytesMessageFacade facade = (JmsBytesMessageFacade) message.getFacade(); assertTrue(facade instanceof AmqpJmsBytesMessageFacade); AmqpJmsBytesMessageFacade amqpMessage = (AmqpJmsBytesMessageFacade) facade; assertEquals(JMS_BYTES_MESSAGE, amqpMessage.getJmsMsgType()); assertEquals(0, amqpMessage.getBodyLength()); }