use of org.apache.qpid.jms.JmsQueue in project hono by eclipse.
the class DeviceRegistrationIT method testOpenReceiverFailsForMalformedReplyToAddress.
/**
* Verifies that a client must use a correct <em>reply-to</em> address when opening a link for receiving registration responses.
*
* @throws Exception if the test fails.
*/
@Test
public void testOpenReceiverFailsForMalformedReplyToAddress() throws Exception {
// GIVEN a source address that does not contain a resourceId segment
final Destination invalidSource = new JmsQueue("registration/" + JmsIntegrationTestSupport.TEST_TENANT_ID);
// WHEN trying to open a receiver link using the malformed source address
try {
registration.createConsumerWithoutListener(invalidSource);
fail("Should have failed to create consumer");
} catch (JMSException e) {
// THEN the attempt fails
}
}
Aggregations