public Exchange createExchange(Message message, Session session) {
        Exchange exchange = createExchange(getExchangePattern());
        exchange.setIn(new SjmsMessage(exchange, message, session, getBinding()));
        return exchange;
    }
@Test
    public void testInOutExchangePattern() {
        try {
            Endpoint sjms = context.getEndpoint("sjms:queue:test.SjmsEndpointTest?exchangePattern=" + ExchangePattern.InOut);
            assertNotNull(sjms);
            assertEquals(ExchangePattern.InOut, sjms.createExchange().getPattern());
        } catch (Exception e) {
            fail("Exception thrown: " + e.getLocalizedMessage());
        }
    }