### Question:
JMSConfigFactory { public static JMSConfiguration createFromEndpoint(Bus bus, JMSEndpoint endpoint) { JMSConfiguration jmsConfig = new JMSConfiguration(); int deliveryMode = endpoint.getDeliveryMode() == org.apache.cxf.transport.jms.uri.JMSEndpoint.DeliveryModeType.PERSISTENT ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT; jmsConfig.setDeliveryMode(deliveryMode); jmsConfig.setPriority(endpoint.getPriority()); jmsConfig.setExplicitQosEnabled(true); jmsConfig.setMessageType(endpoint.getMessageType().value()); boolean pubSubDomain = endpoint.getJmsVariant().contains(JMSEndpoint.TOPIC); jmsConfig.setPubSubDomain(pubSubDomain); jmsConfig.setDurableSubscriptionName(endpoint.getDurableSubscriptionName()); jmsConfig.setDurableSubscriptionClientId(endpoint.getDurableSubscriptionClientId()); jmsConfig.setReceiveTimeout(endpoint.getReceiveTimeout()); jmsConfig.setTimeToLive(endpoint.getTimeToLive()); jmsConfig.setSessionTransacted(endpoint.isSessionTransacted()); if (!endpoint.isUseConduitIdSelector()) { jmsConfig.setUseConduitIdSelector(endpoint.isUseConduitIdSelector()); } jmsConfig.setConduitSelectorPrefix(endpoint.getConduitIdSelectorPrefix()); jmsConfig.setUserName(endpoint.getUsername()); jmsConfig.setPassword(endpoint.getPassword()); jmsConfig.setConcurrentConsumers(endpoint.getConcurrentConsumers()); jmsConfig.setOneSessionPerConnection(endpoint.isOneSessionPerConnection()); jmsConfig.setMessageSelector(endpoint.getMessageSelector()); TransactionManager tm = getTransactionManager(bus, endpoint); jmsConfig.setTransactionManager(tm); if (endpoint.getJndiURL() != null) { jmsConfig.setJndiEnvironment(JMSConfigFactory.getInitialContextEnv(endpoint)); jmsConfig.setConnectionFactoryName(endpoint.getJndiConnectionFactoryName()); } else { ConfiguredBeanLocator locator = bus.getExtension(ConfiguredBeanLocator.class); if (endpoint.getConnectionFactory() != null) { jmsConfig.setConnectionFactory(endpoint.getConnectionFactory()); } else if (locator != null) { ConnectionFactory cf = locator.getBeanOfType(endpoint.getJndiConnectionFactoryName(), ConnectionFactory.class); if (cf != null) { jmsConfig.setConnectionFactory(cf); } } } boolean resolveUsingJndi = endpoint.getJmsVariant().contains(JMSEndpoint.JNDI); if (resolveUsingJndi) { JndiHelper jt = new JndiHelper(JMSConfigFactory.getInitialContextEnv(endpoint)); final JMSDestinationResolver jndiDestinationResolver = new JMSDestinationResolver(); jndiDestinationResolver.setJndiTemplate(jt); jmsConfig.setDestinationResolver(jndiDestinationResolver); jmsConfig.setTargetDestination(endpoint.getDestinationName()); setReplyDestination(jmsConfig, endpoint); } else { jmsConfig.setTargetDestination(endpoint.getDestinationName()); setReplyDestination(jmsConfig, endpoint); } String requestURI = endpoint.getRequestURI(); jmsConfig.setRequestURI(requestURI); String targetService = endpoint.getTargetService(); jmsConfig.setTargetService(targetService); jmsConfig.setMessageSelector(endpoint.getMessageSelector()); int retryInterval = endpoint.getRetryInterval(); jmsConfig.setRetryInterval(retryInterval); return jmsConfig; } private  JMSConfigFactory(); static JMSConfiguration createFromEndpointInfo(Bus bus, EndpointInfo endpointInfo,
                                                          EndpointReferenceType target); static JMSConfiguration createFromEndpoint(Bus bus, JMSEndpoint endpoint); static Properties getInitialContextEnv(JMSEndpoint endpoint);  }### Answer:
@Test public void testConcurrentConsumers() { JMSEndpoint endpoint = new JMSEndpoint("jms:queue:Foo.Bar?concurrentConsumers=4"); JMSConfiguration jmsConfig = JMSConfigFactory.createFromEndpoint(bus, endpoint); Assert.assertEquals(4, jmsConfig.getConcurrentConsumers()); }