@Test public void testMessageToSendHasContentTypeSet() throws Exception { AmqpJmsBytesMessageFacade amqpBytesMessageFacade = createNewBytesMessageFacade(); amqpBytesMessageFacade.onSend(0); Properties properties = amqpBytesMessageFacade.getProperties(); assertNotNull(properties); assertNotNull(properties.getContentType()); String contentType = properties.getContentType().toString(); assertNotNull("content type should be set", contentType); assertEquals("application/octet-stream", contentType); }
@Override public void onSend(long producerTtl) throws JMSException { super.onSend(producerTtl); if(getContentType() == null) { setContentType(OCTET_STREAM_CONTENT_TYPE); } reset(); }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public void onSend(long producerTtl) throws JMSException { super.onSend(producerTtl); if(getContentType() == null) { setContentType(OCTET_STREAM_CONTENT_TYPE); } reset(); } }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public void onSend(long producerTtl) throws JMSException { super.onSend(producerTtl); if(getContentType() == null) { setContentType(OCTET_STREAM_CONTENT_TYPE); } reset(); }  }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public void onSend(long producerTtl) throws JMSException { super.onSend(producerTtl); if(getContentType() == null) { setContentType(OCTET_STREAM_CONTENT_TYPE); } reset(); }  @Override AmqpJmsBytesMessageFacade copy(); @Override byte getJmsMsgType(); @Override void clearBody(); @Override InputStream getInputStream(); @Override OutputStream getOutputStream(); @Override void reset(); @Override int getBodyLength(); @Override boolean hasBody(); @Override JmsBytesMessage asJmsMessage(); @Override byte[] copyBody(); @Override void onSend(long producerTtl); }
AmqpJmsBytesMessageFacade extends AmqpJmsMessageFacade implements JmsBytesMessageFacade { @Override public void onSend(long producerTtl) throws JMSException { super.onSend(producerTtl); if(getContentType() == null) { setContentType(OCTET_STREAM_CONTENT_TYPE); } reset(); }  @Override AmqpJmsBytesMessageFacade copy(); @Override byte getJmsMsgType(); @Override void clearBody(); @Override InputStream getInputStream(); @Override OutputStream getOutputStream(); @Override void reset(); @Override int getBodyLength(); @Override boolean hasBody(); @Override JmsBytesMessage asJmsMessage(); @Override byte[] copyBody(); @Override void onSend(long producerTtl);  }