@Test
public void testInvalidMaxConcurrentConsumers() throws Exception {
JmsEndpoint endpoint = (JmsEndpoint) resolveMandatoryEndpoint("jms:queue:Foo?concurrentConsumers=5&maxConcurrentConsumers=2");
try {
endpoint.createConsumer(new Logger());
fail("Should have thrown exception");
} catch (IllegalArgumentException e) {
assertEquals("Property maxConcurrentConsumers: 2 must be higher than concurrentConsumers: 5", e.getMessage());
}
}