Search in sources :

Example 1 with JmsQueue

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
    }
}
Also used : Destination(javax.jms.Destination) JmsQueue(org.apache.qpid.jms.JmsQueue) JMSException(javax.jms.JMSException) Test(org.junit.Test)

Aggregations

Destination (javax.jms.Destination)1 JMSException (javax.jms.JMSException)1 JmsQueue (org.apache.qpid.jms.JmsQueue)1 Test (org.junit.Test)1