qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject qpid-jms git commit: QPIDJMS-332: change property used for JNDI storage of destination names
Date Tue, 03 Oct 2017 12:31:15 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 723772cc9 -> 9692e6b42


QPIDJMS-332: change property used for JNDI storage of destination names

Stop using "name" to allow for Tomcat context.xml resource definition, where "name" is the JNDI lookup. Use "address" going forward but continue to accept both, allowing other existing configuration to still work.

Changes by myself and Tim.


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/9692e6b4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/9692e6b4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/9692e6b4

Branch: refs/heads/master
Commit: 9692e6b42922c59f091724d8ae7814d9c5432b33
Parents: 723772c
Author: Robbie Gemmell <robbie@apache.org>
Authored: Tue Oct 3 13:26:13 2017 +0100
Committer: Robbie Gemmell <robbie@apache.org>
Committed: Tue Oct 3 13:26:13 2017 +0100

----------------------------------------------------------------------
 .../org/apache/qpid/jms/JmsDestination.java     |  38 ++--
 .../main/java/org/apache/qpid/jms/JmsQueue.java |   2 +-
 .../qpid/jms/JmsTemporaryDestination.java       |   6 +-
 .../org/apache/qpid/jms/JmsTemporaryQueue.java  |   2 +-
 .../org/apache/qpid/jms/JmsTemporaryTopic.java  |   2 +-
 .../main/java/org/apache/qpid/jms/JmsTopic.java |   2 +-
 .../AmqpTemporaryDestinationBuilder.java        |   6 +-
 .../amqp/message/AmqpDestinationHelper.java     |   2 +-
 .../java/org/apache/qpid/jms/JmsQueueTest.java  |  29 ++-
 .../apache/qpid/jms/JmsTemporaryQueueTest.java  |  31 +++-
 .../apache/qpid/jms/JmsTemporaryTopicTest.java  |  31 +++-
 .../java/org/apache/qpid/jms/JmsTopicTest.java  |  29 ++-
 .../qpid/jms/jndi/JNDIReferenceFactoryTest.java | 175 +++++++++++++++++++
 .../JmsMessagePropertyIntercepterTest.java      |   4 +-
 .../message/JmsMessageTransformationTest.java   |  12 +-
 .../amqp/message/AmqpDestinationHelperTest.java |  72 ++++----
 16 files changed, 360 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsDestination.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsDestination.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsDestination.java
index 814f07c..5b4e443 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsDestination.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsDestination.java
@@ -30,34 +30,35 @@ import org.apache.qpid.jms.jndi.JNDIStorable;
  * Jms Destination
  */
 public abstract class JmsDestination extends JNDIStorable implements Externalizable, javax.jms.Destination, Comparable<JmsDestination> {
-    private static final String NAME_PROP = "name";
+    private static final String NAME_PROP = "address";
+    private static final String LEGACY_NAME_PROP = "name";
 
-    protected transient String name;
+    protected transient String address;
     protected transient boolean topic;
     protected transient boolean temporary;
     protected transient int hashValue;
     protected transient JmsConnection connection;
 
-    protected JmsDestination(String name, boolean topic, boolean temporary) {
-        this.name = name;
+    protected JmsDestination(String address, boolean topic, boolean temporary) {
+        this.address = address;
         this.topic = topic;
         this.temporary = temporary;
     }
 
     @Override
     public String toString() {
-        return name;
+        return address;
     }
 
     /**
-     * @return name of destination
+     * @return address of destination
      */
-    public String getName() {
-        return this.name;
+    public String getAddress() {
+        return this.address;
     }
 
-    public void setName(String name) {
-        this.name = name;
+    public void setAddress(String address) {
+        this.address = address;
     }
 
     /**
@@ -83,17 +84,18 @@ public abstract class JmsDestination extends JNDIStorable implements Externaliza
 
     @Override
     protected Map<String, String> buildFromProperties(Map<String, String> props) {
-        setName(getProperty(props, NAME_PROP, ""));
+        setAddress(getProperty(props, NAME_PROP, getProperty(props, LEGACY_NAME_PROP, "")));
 
         Map<String, String> unused = new HashMap<String,String>(props);
         unused.remove(NAME_PROP);
+        unused.remove(LEGACY_NAME_PROP);
 
         return Collections.unmodifiableMap(unused);
     }
 
     @Override
     protected void populateProperties(Map<String, String> props) {
-        props.put(NAME_PROP, getName());
+        props.put(NAME_PROP, getAddress());
     }
 
     /**
@@ -110,7 +112,7 @@ public abstract class JmsDestination extends JNDIStorable implements Externaliza
                 return 0;
             }
             if (isTemporary() == other.isTemporary()) {
-                return getName().compareTo(other.getName());
+                return getAddress().compareTo(other.getAddress());
             }
             return -1;
         }
@@ -127,9 +129,9 @@ public abstract class JmsDestination extends JNDIStorable implements Externaliza
         }
 
         JmsDestination other = (JmsDestination) o;
-        if (name == null && other.name != null) {
+        if (address == null && other.address != null) {
             return false;
-        } else if (name != null && !name.equals(other.name)) {
+        } else if (address != null && !address.equals(other.address)) {
             return false;
         }
 
@@ -148,7 +150,7 @@ public abstract class JmsDestination extends JNDIStorable implements Externaliza
         if (hashValue == 0) {
             final int prime = 31;
             hashValue = 1;
-            hashValue = prime * hashValue + ((name == null) ? 0 : name.hashCode());
+            hashValue = prime * hashValue + ((address == null) ? 0 : address.hashCode());
             hashValue = prime * hashValue + (temporary ? 1231 : 1237);
             hashValue = prime * hashValue + (topic ? 1231 : 1237);
         }
@@ -157,11 +159,11 @@ public abstract class JmsDestination extends JNDIStorable implements Externaliza
 
     @Override
     public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeUTF(getName());
+        out.writeUTF(getAddress());
     }
 
     @Override
     public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        setName(in.readUTF());
+        setAddress(in.readUTF());
     }
 }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsQueue.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsQueue.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsQueue.java
index 345af0e..b24dd12 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsQueue.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsQueue.java
@@ -37,6 +37,6 @@ public class JmsQueue extends JmsDestination implements Queue {
      */
     @Override
     public String getQueueName() {
-        return getName();
+        return getAddress();
     }
 }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryDestination.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryDestination.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryDestination.java
index e299b7f..18ee1e6 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryDestination.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryDestination.java
@@ -50,12 +50,12 @@ public abstract class JmsTemporaryDestination extends JmsDestination implements
     }
 
     @Override
-	public ResourceState getState() {
+    public ResourceState getState() {
         return state;
     }
 
     @Override
-	public void setState(ResourceState state) {
+    public void setState(ResourceState state) {
         this.state = state;
     }
 
@@ -99,7 +99,7 @@ public abstract class JmsTemporaryDestination extends JmsDestination implements
     private class JmsTemporaryDestinationId extends JmsAbstractResourceId implements Comparable<JmsTemporaryDestinationId> {
 
         public String getDestinationName() {
-            return getName();
+            return getAddress();
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
index 1a388d3..39e10a3 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
@@ -46,6 +46,6 @@ public class JmsTemporaryQueue extends JmsTemporaryDestination implements Tempor
      */
     @Override
     public String getQueueName() {
-        return getName();
+        return getAddress();
     }
 }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
index 17f5c41..1c25d34 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
@@ -46,6 +46,6 @@ public class JmsTemporaryTopic extends JmsTemporaryDestination implements Tempor
      */
     @Override
     public String getTopicName() {
-        return getName();
+        return getAddress();
     }
 }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTopic.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTopic.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTopic.java
index 88087a7..55c4006 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTopic.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTopic.java
@@ -37,6 +37,6 @@ public class JmsTopic extends JmsDestination implements Topic {
      */
     @Override
     public String getTopicName() {
-        return getName();
+        return getAddress();
     }
 }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpTemporaryDestinationBuilder.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpTemporaryDestinationBuilder.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpTemporaryDestinationBuilder.java
index debfcc8..1a5ade0 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpTemporaryDestinationBuilder.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpTemporaryDestinationBuilder.java
@@ -53,7 +53,7 @@ public class AmqpTemporaryDestinationBuilder extends AmqpResourceBuilder<AmqpTem
     @Override
     protected Sender createEndpoint(JmsTemporaryDestination resourceInfo) {
         // Form a link name, use the local generated name with a prefix to aid debugging
-        String localDestinationName = resourceInfo.getName();
+        String localDestinationName = resourceInfo.getAddress();
         String senderLinkName = null;
         if (resourceInfo.isQueue()) {
             senderLinkName = "qpid-jms:" + TEMP_QUEUE_CREATOR + localDestinationName;
@@ -107,10 +107,10 @@ public class AmqpTemporaryDestinationBuilder extends AmqpResourceBuilder<AmqpTem
     protected void afterOpened() {
         if (!isClosePending()) {
             // Once our sender is opened we can read the updated name from the target address.
-            String oldDestinationName = resourceInfo.getName();
+            String oldDestinationName = resourceInfo.getAddress();
             String destinationName = getEndpoint().getRemoteTarget().getAddress();
 
-            resourceInfo.setName(destinationName);
+            resourceInfo.setAddress(destinationName);
 
             LOG.trace("Updated temp destination to: {} from: {}", destinationName, oldDestinationName);
         }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelper.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelper.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelper.java
index 8b3de5d..4eea4cb 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelper.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelper.java
@@ -197,7 +197,7 @@ public class AmqpDestinationHelper {
             return null;
         }
 
-        final String name = destination.getName();
+        final String name = destination.getAddress();
 
         // Add prefix if necessary
         if (!destination.isTemporary()) {

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsQueueTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsQueueTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsQueueTest.java
index 7e28350..835a643 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsQueueTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsQueueTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -34,7 +35,8 @@ import org.junit.Test;
 
 public class JmsQueueTest extends QpidJmsTestCase {
 
-    private static final String NAME_PROP = "name";
+    private static final String NAME_PROP = "address";
+    private static final String LEGACY_NAME_PROP = "name";
 
     @Test
     public void testIsQueue() {
@@ -119,11 +121,34 @@ public class JmsQueueTest extends QpidJmsTestCase {
 
     @Test
     public void testSetProperties() throws Exception {
+        setPropertiesTestImpl(true, false);
+    }
+
+    @Test
+    public void testSetPropertiesWithLegacyNameProp() throws Exception {
+        setPropertiesTestImpl(false, true);
+    }
+
+    @Test
+    public void testSetPropertiesWithBothNameProps() throws Exception {
+        setPropertiesTestImpl(true, true);
+    }
+
+    private void setPropertiesTestImpl(boolean addNameProp, boolean addLegacyNameProp) {
         String name = "myQueue";
         JmsQueue queue = new JmsQueue();
 
+        assertNull("Shouldnt have name yet", queue.getQueueName());
+
         Map<String, String> props = new HashMap<String, String>();
-        props.put(NAME_PROP, name);
+        if(addNameProp) {
+            props.put(NAME_PROP, name);
+        }
+
+        if(addLegacyNameProp) {
+            props.put(LEGACY_NAME_PROP, name);
+        }
+
         Map<String, String> unusedProps = queue.setProperties(props);
 
         assertEquals("Unexpected value for name", name, queue.getQueueName());

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryQueueTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryQueueTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryQueueTest.java
index 6d86c23..0d83316 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryQueueTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryQueueTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -34,7 +35,8 @@ import org.junit.Test;
 
 public class JmsTemporaryQueueTest extends QpidJmsTestCase {
 
-    private static final String NAME_PROP = "name";
+    private static final String NAME_PROP = "address";
+    private static final String LEGACY_NAME_PROP = "name";
 
     @Test
     public void testIsQueue() {
@@ -119,11 +121,34 @@ public class JmsTemporaryQueueTest extends QpidJmsTestCase {
 
     @Test
     public void testSetProperties() throws Exception {
+        setPropertiesTestImpl(true, false);
+    }
+
+    @Test
+    public void testSetPropertiesWithLegacyNameProp() throws Exception {
+        setPropertiesTestImpl(false, true);
+    }
+
+    @Test
+    public void testSetPropertiesWithBothNameProps() throws Exception {
+        setPropertiesTestImpl(true, true);
+    }
+
+    private void setPropertiesTestImpl(boolean addNameProp, boolean addLegacyNameProp) {
         String name = "myQueue";
         JmsTemporaryQueue queue = new JmsTemporaryQueue();
 
+        assertNull("Shouldnt have name yet", queue.getQueueName());
+
         Map<String, String> props = new HashMap<String, String>();
-        props.put(NAME_PROP, name);
+        if(addNameProp) {
+            props.put(NAME_PROP, name);
+        }
+
+        if(addLegacyNameProp) {
+            props.put(LEGACY_NAME_PROP, name);
+        }
+
         Map<String, String> unusedProps = queue.setProperties(props);
 
         assertEquals("Unexpected value for name", name, queue.getQueueName());
@@ -143,7 +168,7 @@ public class JmsTemporaryQueueTest extends QpidJmsTestCase {
         String name = "myQueue";
         String unusedKey = "unusedKey";
         String unusedValue = "unusedValue";
-        JmsQueue queue = new JmsQueue();
+        JmsTemporaryQueue queue = new JmsTemporaryQueue();
 
         Map<String, String> props = new HashMap<String, String>();
         props.put(NAME_PROP, name);

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryTopicTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryTopicTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryTopicTest.java
index 01138dd..b7f3d67 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryTopicTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTemporaryTopicTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -34,7 +35,8 @@ import org.junit.Test;
 
 public class JmsTemporaryTopicTest extends QpidJmsTestCase {
 
-    private static final String NAME_PROP = "name";
+    private static final String NAME_PROP = "address";
+    private static final String LEGACY_NAME_PROP = "name";
 
     @Test
     public void testIsQueue() {
@@ -119,11 +121,34 @@ public class JmsTemporaryTopicTest extends QpidJmsTestCase {
 
     @Test
     public void testSetProperties() throws Exception {
+        setPropertiesTestImpl(true, false);
+    }
+
+    @Test
+    public void testSetPropertiesWithLegacyNameProp() throws Exception {
+        setPropertiesTestImpl(false, true);
+    }
+
+    @Test
+    public void testSetPropertiesWithBothNameProps() throws Exception {
+        setPropertiesTestImpl(true, true);
+    }
+
+    private void setPropertiesTestImpl(boolean addNameProp, boolean addLegacyNameProp) {
         String name = "myTopic";
         JmsTemporaryTopic topic = new JmsTemporaryTopic();
 
+        assertNull("Shouldnt have name yet", topic.getTopicName());
+
         Map<String, String> props = new HashMap<String, String>();
-        props.put(NAME_PROP, name);
+        if(addNameProp) {
+            props.put(NAME_PROP, name);
+        }
+
+        if(addLegacyNameProp) {
+            props.put(LEGACY_NAME_PROP, name);
+        }
+
         Map<String, String> unusedProps = topic.setProperties(props);
 
         assertEquals("Unexpected value for name", name, topic.getTopicName());
@@ -143,7 +168,7 @@ public class JmsTemporaryTopicTest extends QpidJmsTestCase {
         String name = "myTopic";
         String unusedKey = "unusedKey";
         String unusedValue = "unusedValue";
-        JmsTopic topic = new JmsTopic();
+        JmsTemporaryTopic topic = new JmsTemporaryTopic();
 
         Map<String, String> props = new HashMap<String, String>();
         props.put(NAME_PROP, name);

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTopicTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTopicTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTopicTest.java
index 8cf5013..f43e828 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTopicTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/JmsTopicTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -34,7 +35,8 @@ import org.junit.Test;
 
 public class JmsTopicTest extends QpidJmsTestCase {
 
-    private static final String NAME_PROP = "name";
+    private static final String NAME_PROP = "address";
+    private static final String LEGACY_NAME_PROP = "name";
 
     @Test
     public void testIsQueue() {
@@ -119,11 +121,34 @@ public class JmsTopicTest extends QpidJmsTestCase {
 
     @Test
     public void testSetProperties() throws Exception {
+        setPropertiesTestImpl(true, false);
+    }
+
+    @Test
+    public void testSetPropertiesWithLegacyNameProp() throws Exception {
+        setPropertiesTestImpl(false, true);
+    }
+
+    @Test
+    public void testSetPropertiesWithBothNameProps() throws Exception {
+        setPropertiesTestImpl(true, true);
+    }
+
+    private void setPropertiesTestImpl(boolean addNameProp, boolean addLegacyNameProp) {
         String name = "myTopic";
         JmsTopic topic = new JmsTopic();
 
+        assertNull("Shouldnt have name yet", topic.getTopicName());
+
         Map<String, String> props = new HashMap<String, String>();
-        props.put(NAME_PROP, name);
+        if(addNameProp) {
+            props.put(NAME_PROP, name);
+        }
+
+        if(addLegacyNameProp) {
+            props.put(LEGACY_NAME_PROP, name);
+        }
+
         Map<String, String> unusedProps = topic.setProperties(props);
 
         assertEquals("Unexpected value for name", name, topic.getTopicName());

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JNDIReferenceFactoryTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JNDIReferenceFactoryTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JNDIReferenceFactoryTest.java
new file mode 100644
index 0000000..a523965
--- /dev/null
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JNDIReferenceFactoryTest.java
@@ -0,0 +1,175 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.jms.jndi;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.NoSuchElementException;
+
+import javax.jms.JMSException;
+import javax.jms.Queue;
+import javax.jms.Topic;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.StringRefAddr;
+import javax.naming.spi.ObjectFactory;
+
+import org.apache.qpid.jms.JmsConnectionFactory;
+import org.apache.qpid.jms.JmsQueue;
+import org.apache.qpid.jms.JmsTopic;
+import org.apache.qpid.jms.test.QpidJmsTestCase;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JNDIReferenceFactoryTest extends QpidJmsTestCase {
+
+    private static final String DESTINATION_NAME_PROP = "address";
+    private static final String LEGACY_DESTINATION_NAME_PROP = "name";
+    private static final String REMOTE_URI_NAME_PROP = "remoteURI";
+
+    private static final String TEST_CONNECTION_URL = "amqp://somehost:2765";
+    private static final String TEST_QUEUE_ADDRESS = "myQueue";
+    private static final String TEST_TOPIC_ADDRESS = "myTopic";
+
+    private Name mockName;
+    private Context mockContext;
+    private Hashtable<?, ?> testEnvironment;
+    private ObjectFactory referenceFactory;
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+
+        mockName = mock(Name.class);
+        mockContext = mock(Context.class);
+        testEnvironment = new Hashtable<>();
+
+        referenceFactory = new JNDIReferenceFactory();
+    }
+
+    @Test
+    public void testGetObjectInstanceCreatesJmsConnectionFactory() throws Exception {
+        Reference reference = createTestReference(JmsConnectionFactory.class.getName(), REMOTE_URI_NAME_PROP, TEST_CONNECTION_URL);
+
+        Object connFactory = referenceFactory.getObjectInstance(reference, mockName, mockContext, testEnvironment);
+
+        assertNotNull("Expected object to be created", connFactory);
+        assertEquals("Unexpected object type created", JmsConnectionFactory.class, connFactory.getClass());
+        assertEquals("Unexpected URI", TEST_CONNECTION_URL, ((JmsConnectionFactory) connFactory).getRemoteURI());
+    }
+
+    @Test
+    public void testGetObjectInstanceCreatesJmsQueue() throws Exception {
+        doGetObjectInstanceCreatesJmsQueueTestImpl(DESTINATION_NAME_PROP);
+    }
+
+    @Test
+    public void testGetObjectInstanceCreatesJmsQueueUsingLegacyNameProp() throws Exception {
+        doGetObjectInstanceCreatesJmsQueueTestImpl(LEGACY_DESTINATION_NAME_PROP);
+    }
+
+    private void doGetObjectInstanceCreatesJmsQueueTestImpl(String nameAddressProp) throws Exception, JMSException {
+        Reference reference = createTestReference(JmsQueue.class.getName(), nameAddressProp, TEST_QUEUE_ADDRESS);
+
+        Object queue = referenceFactory.getObjectInstance(reference, mockName, mockContext, testEnvironment);
+
+        assertNotNull("Expected object to be created", queue);
+        assertEquals("Unexpected object type created", JmsQueue.class, queue.getClass());
+        assertEquals("Unexpected address", TEST_QUEUE_ADDRESS, ((JmsQueue) queue).getAddress());
+        assertEquals("Unexpected queue name", TEST_QUEUE_ADDRESS, ((Queue) queue).getQueueName());
+
+    }
+
+    @Test
+    public void testGetObjectInstanceCreatesJmsTopic() throws Exception {
+        doGetObjectInstanceCreatesJmsTopicTestImpl(DESTINATION_NAME_PROP);
+    }
+
+    @Test
+    public void testGetObjectInstanceCreatesJmsTopicUsingLegacyNameProp() throws Exception {
+        doGetObjectInstanceCreatesJmsTopicTestImpl(LEGACY_DESTINATION_NAME_PROP);
+    }
+
+    private void doGetObjectInstanceCreatesJmsTopicTestImpl(String nameAddressProp) throws Exception, JMSException {
+        Reference reference = createTestReference(JmsTopic.class.getName(), nameAddressProp, TEST_TOPIC_ADDRESS);
+
+        Object topic = referenceFactory.getObjectInstance(reference, mockName, mockContext, testEnvironment);
+
+        assertNotNull("Expected object to be created", topic);
+        assertEquals("Unexpected object type created", JmsTopic.class, topic.getClass());
+        assertEquals("Unexpected address", TEST_TOPIC_ADDRESS, ((JmsTopic) topic).getAddress());
+        assertEquals("Unexpected queue name", TEST_TOPIC_ADDRESS, ((Topic) topic).getTopicName());
+    }
+
+    private Reference createTestReference(String className, String addressType, Object content) {
+        Reference mockReference = mock(Reference.class);
+        when(mockReference.getClassName()).thenReturn(className);
+
+        RefAddr mockRefAddr = mock(StringRefAddr.class);
+        when(mockRefAddr.getType()).thenReturn(addressType);
+        when(mockRefAddr.getContent()).thenReturn(content);
+
+        RefAddrTestEnumeration testEnumeration = new RefAddrTestEnumeration(mockRefAddr);
+        when(mockReference.getAll()).thenReturn(testEnumeration);
+
+        return mockReference;
+    }
+
+    private class RefAddrTestEnumeration implements Enumeration<RefAddr> {
+        boolean hasMore = true;
+        final RefAddr element;
+
+        public RefAddrTestEnumeration(RefAddr mockAddr) {
+            element = mockAddr;
+        }
+
+        @Override
+        public boolean hasMoreElements() {
+            return hasMore;
+        }
+
+        @Override
+        public RefAddr nextElement() {
+            if (!hasMore) {
+                throw new NoSuchElementException("No more elements");
+            }
+
+            hasMore = false;
+            return element;
+        }
+    }
+
+    @Test
+    public void testGetObjectInstanceWithUnknownClassName() throws Exception {
+        Reference reference = createTestReference(Object.class.getName(), "redundant", "redundant");
+
+        Object factory = referenceFactory.getObjectInstance(reference, mockName, mockContext, testEnvironment);
+        assertNull("Expected null when given unknown class name", factory);
+    }
+}

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessagePropertyIntercepterTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessagePropertyIntercepterTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessagePropertyIntercepterTest.java
index 4a0c6f2..a8d5145 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessagePropertyIntercepterTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessagePropertyIntercepterTest.java
@@ -119,7 +119,7 @@ public class JmsMessagePropertyIntercepterTest {
         Mockito.when(message.getFacade()).thenReturn(facade);
         JmsDestination destination = new JmsQueue("TestDestination");
         Mockito.when(facade.getDestination()).thenReturn(destination);
-        assertEquals(destination.getName(), JmsMessagePropertyIntercepter.getProperty(message, JMS_DESTINATION));
+        assertEquals(destination.getAddress(), JmsMessagePropertyIntercepter.getProperty(message, JMS_DESTINATION));
     }
 
     @Test(expected=JMSException.class)
@@ -231,7 +231,7 @@ public class JmsMessagePropertyIntercepterTest {
         Mockito.when(message.getFacade()).thenReturn(facade);
         JmsDestination destination = new JmsQueue("TestDestination");
         Mockito.when(facade.getReplyTo()).thenReturn(destination);
-        assertEquals(destination.getName(), JmsMessagePropertyIntercepter.getProperty(message, JMS_REPLYTO));
+        assertEquals(destination.getAddress(), JmsMessagePropertyIntercepter.getProperty(message, JMS_REPLYTO));
     }
 
     @Test(expected=JMSException.class)

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTransformationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTransformationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTransformationTest.java
index 6cd60c8..792742a 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTransformationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/message/JmsMessageTransformationTest.java
@@ -401,7 +401,7 @@ public class JmsMessageTransformationTest {
         assertNotNull(transformed);
         assertTrue(transformed.isTopic());
         assertFalse(transformed.isTemporary());
-        assertEquals(DESTINATION_NAME, transformed.getName());
+        assertEquals(DESTINATION_NAME, transformed.getAddress());
     }
 
     @Test
@@ -413,7 +413,7 @@ public class JmsMessageTransformationTest {
         assertNotNull(transformed);
         assertTrue(transformed.isQueue());
         assertFalse(transformed.isTemporary());
-        assertEquals(DESTINATION_NAME, transformed.getName());
+        assertEquals(DESTINATION_NAME, transformed.getAddress());
     }
 
     @Test
@@ -431,7 +431,7 @@ public class JmsMessageTransformationTest {
         assertNotNull(transformed);
         assertTrue(transformed.isTopic());
         assertFalse(transformed.isTemporary());
-        assertEquals(DESTINATION_NAME, transformed.getName());
+        assertEquals(DESTINATION_NAME, transformed.getAddress());
     }
 
     @Test
@@ -442,7 +442,7 @@ public class JmsMessageTransformationTest {
         assertNotNull(transformed);
         assertTrue(transformed.isQueue());
         assertFalse(transformed.isTemporary());
-        assertEquals(DESTINATION_NAME, transformed.getName());
+        assertEquals(DESTINATION_NAME, transformed.getAddress());
     }
 
     @Test
@@ -453,7 +453,7 @@ public class JmsMessageTransformationTest {
         assertNotNull(transformed);
         assertTrue(transformed.isQueue());
         assertTrue(transformed.isTemporary());
-        assertEquals(DESTINATION_NAME, transformed.getName());
+        assertEquals(DESTINATION_NAME, transformed.getAddress());
     }
 
     @Test
@@ -464,7 +464,7 @@ public class JmsMessageTransformationTest {
         assertNotNull(transformed);
         assertTrue(transformed.isTopic());
         assertTrue(transformed.isTemporary());
-        assertEquals(DESTINATION_NAME, transformed.getName());
+        assertEquals(DESTINATION_NAME, transformed.getAddress());
     }
 
     //---------- Mocking support ---------------------------------------------//

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9692e6b4/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelperTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelperTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelperTest.java
index bc6ef36..731cc55 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelperTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelperTest.java
@@ -87,13 +87,13 @@ public class AmqpDestinationHelperTest {
         Mockito.when(message.getToAddress()).thenReturn(testAddress);
 
         JmsDestination consumerDestination = Mockito.mock(JmsDestination.class);
-        Mockito.when(consumerDestination.getName()).thenReturn("ConsumerDestination");
+        Mockito.when(consumerDestination.getAddress()).thenReturn("ConsumerDestination");
 
         JmsDestination destination = helper.getJmsDestination(message, consumerDestination);
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -109,7 +109,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
 
@@ -126,7 +126,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -142,7 +142,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -158,7 +158,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     // --- new byte destination type annotations --- //
@@ -177,7 +177,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -202,7 +202,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -227,7 +227,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -250,7 +250,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -273,7 +273,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     // --- legacy string destination type annotations --- //
@@ -292,7 +292,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -309,7 +309,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -325,7 +325,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -341,7 +341,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -355,7 +355,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -369,7 +369,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     //========================================================================//
@@ -409,7 +409,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -425,7 +425,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -441,7 +441,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -457,7 +457,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -469,13 +469,13 @@ public class AmqpDestinationHelperTest {
         Mockito.when(message.getReplyToAddress()).thenReturn(testAddress);
 
         JmsDestination consumerDestination = Mockito.mock(JmsDestination.class);
-        Mockito.when(consumerDestination.getName()).thenReturn("ConsumerDestination");
+        Mockito.when(consumerDestination.getAddress()).thenReturn("ConsumerDestination");
 
         JmsDestination destination = helper.getJmsReplyTo(message, consumerDestination);
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     // --- new byte destination type annotations --- //
@@ -494,7 +494,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -519,7 +519,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -544,7 +544,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -567,7 +567,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -590,7 +590,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     // --- legacy string destination type annotations --- //
@@ -609,7 +609,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -626,7 +626,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -642,7 +642,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -658,7 +658,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertFalse(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -672,7 +672,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isQueue());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     @Test
@@ -686,7 +686,7 @@ public class AmqpDestinationHelperTest {
         assertNotNull(destination);
         assertTrue(destination.isTopic());
         assertTrue(destination.isTemporary());
-        assertEquals(testAddress, destination.getName());
+        assertEquals(testAddress, destination.getAddress());
     }
 
     //========================================================================//
@@ -782,7 +782,7 @@ public class AmqpDestinationHelperTest {
     public void testSetToAddressFromDestinationWithAnonymousDestination() {
         String testAddress = "testAddress";
         JmsDestination destination = Mockito.mock(JmsDestination.class);
-        Mockito.when(destination.getName()).thenReturn(testAddress);
+        Mockito.when(destination.getAddress()).thenReturn(testAddress);
         AmqpJmsMessageFacade message = Mockito.mock(AmqpJmsMessageFacade.class);
 
         helper.setToAddressFromDestination(message, destination);
@@ -884,7 +884,7 @@ public class AmqpDestinationHelperTest {
     public void testSetReplyToAddressFromDestinationWithAnonymousDestination() {
         String testAddress = "testAddress";
         JmsDestination destination = Mockito.mock(JmsDestination.class);
-        Mockito.when(destination.getName()).thenReturn(testAddress);
+        Mockito.when(destination.getAddress()).thenReturn(testAddress);
         AmqpJmsMessageFacade message = Mockito.mock(AmqpJmsMessageFacade.class);
 
         helper.setReplyToAddressFromDestination(message, destination);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message