https://issues.apache.org/jira/browse/AMQCPP-591

Perform a complete conversion on the composite elements of a destination
passing through the STOMP wireFormat converter. 
diff --git a/activemq-cpp/src/main/activemq/wireformat/stomp/StompHelper.cpp b/activemq-cpp/src/main/activemq/wireformat/stomp/StompHelper.cpp
index a8945ea..01f8354 100644
--- a/activemq-cpp/src/main/activemq/wireformat/stomp/StompHelper.cpp
+++ b/activemq-cpp/src/main/activemq/wireformat/stomp/StompHelper.cpp
@@ -36,6 +36,36 @@
 using namespace decaf::util;
 
 ////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    std::string doConvertDestination(StompWireFormat* wireFormat, Pointer<ActiveMQDestination> destination) {
+        switch (destination->getDestinationType()) {
+
+        case cms::Destination::TOPIC:
+            return std::string(wireFormat->getTopicPrefix()) + destination->getPhysicalName();
+        case cms::Destination::TEMPORARY_TOPIC:
+
+            if (destination->getPhysicalName().find("/remote-temp-topic/") == 0) {
+                return destination->getPhysicalName();
+            } else {
+                return std::string(wireFormat->getTempTopicPrefix()) + destination->getPhysicalName();
+            }
+
+        case cms::Destination::TEMPORARY_QUEUE:
+
+            if (destination->getPhysicalName().find("/remote-temp-queue/") == 0) {
+                return destination->getPhysicalName();
+            } else {
+                return std::string(wireFormat->getTempQueuePrefix()) + destination->getPhysicalName();
+            }
+
+        default:
+            return std::string(wireFormat->getQueuePrefix()) + destination->getPhysicalName();
+        }
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
 StompHelper::StompHelper(StompWireFormat* wireformat) : messageIdGenerator(), wireFormat(wireformat) {
 }
 
@@ -159,34 +189,29 @@
 ////////////////////////////////////////////////////////////////////////////////
 std::string StompHelper::convertDestination(const Pointer<ActiveMQDestination>& destination) {
 
-    if (destination == NULL) {
-        return "";
-    } else {
+    std::string result = "";
 
-        switch (destination->getDestinationType()) {
+    if (destination != NULL) {
 
-        case cms::Destination::TOPIC:
-            return std::string(wireFormat->getTopicPrefix()) + destination->getPhysicalName();
-        case cms::Destination::TEMPORARY_TOPIC:
+        if (destination->isComposite()) {
+            ArrayList< Pointer<ActiveMQDestination> > destinations = destination->getCompositeDestinations();
 
-            if (destination->getPhysicalName().find("/remote-temp-topic/") == 0) {
-                return destination->getPhysicalName();
-            } else {
-                return std::string(wireFormat->getTempTopicPrefix()) + destination->getPhysicalName();
+            Pointer<Iterator< Pointer<ActiveMQDestination> > > destIter(destinations.iterator());
+            while (destIter->hasNext()) {
+                Pointer<ActiveMQDestination> composite = destIter->next();
+
+                if (!result.empty()) {
+                    result.append(",");
+                }
+
+                result += doConvertDestination(wireFormat, composite);
             }
-
-        case cms::Destination::TEMPORARY_QUEUE:
-
-            if (destination->getPhysicalName().find("/remote-temp-queue/") == 0) {
-                return destination->getPhysicalName();
-            } else {
-                return std::string(wireFormat->getTempQueuePrefix()) + destination->getPhysicalName();
-            }
-
-        default:
-            return std::string(wireFormat->getQueuePrefix()) + destination->getPhysicalName();
+        } else {
+            result += doConvertDestination(wireFormat, destination);
         }
     }
+
+    return result;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/activemq-cpp/src/test-integration/Makefile.am b/activemq-cpp/src/test-integration/Makefile.am
index 38e31bf..021f55e 100644
--- a/activemq-cpp/src/test-integration/Makefile.am
+++ b/activemq-cpp/src/test-integration/Makefile.am
@@ -17,6 +17,7 @@
 
 cc_sources = \
     TestRegistry.cpp \
+    activemq/test/AdvisoryTest.cpp \
     activemq/test/AsyncSenderTest.cpp \
     activemq/test/BulkMessageTest.cpp \
     activemq/test/CmsConnectionStartStopTest.cpp \
@@ -37,7 +38,7 @@
     activemq/test/openwire/OpenWireCmsSendWithAsyncCallbackTest.cpp \
     activemq/test/openwire/OpenWireMessageListenerRedeliveryTest.cpp \
     activemq/test/openwire/OpenWireRedeliveryPolicyTest.cpp \
-    activemq/test/openwire/OpenwireAdvisorysTest.cpp \
+    activemq/test/openwire/OpenwireAdvisoryTest.cpp \
     activemq/test/openwire/OpenwireAsyncSenderTest.cpp \
     activemq/test/openwire/OpenwireClientAckTest.cpp \
     activemq/test/openwire/OpenwireCmsConnectionStartStopTest.cpp \
@@ -61,6 +62,7 @@
     activemq/test/openwire/OpenwireTransactionTest.cpp \
     activemq/test/openwire/OpenwireVirtualTopicTest.cpp \
     activemq/test/openwire/OpenwireXATransactionsTest.cpp \
+    activemq/test/stomp/StompAdvisoryTest.cpp \
     activemq/test/stomp/StompAsyncSenderTest.cpp \
     activemq/test/stomp/StompBulkMessageTest.cpp \
     activemq/test/stomp/StompCmsConnectionStartStopTest.cpp \
@@ -80,6 +82,7 @@
 
 
 h_sources = \
+    activemq/test/AdvisoryTest.h \
     activemq/test/AsyncSenderTest.h \
     activemq/test/BulkMessageTest.h \
     activemq/test/CMSTestFixture.h \
@@ -101,7 +104,7 @@
     activemq/test/openwire/OpenWireCmsSendWithAsyncCallbackTest.h \
     activemq/test/openwire/OpenWireMessageListenerRedeliveryTest.h \
     activemq/test/openwire/OpenWireRedeliveryPolicyTest.h \
-    activemq/test/openwire/OpenwireAdvisorysTest.h \
+    activemq/test/openwire/OpenwireAdvisoryTest.h \
     activemq/test/openwire/OpenwireAsyncSenderTest.h \
     activemq/test/openwire/OpenwireClientAckTest.h \
     activemq/test/openwire/OpenwireCmsConnectionStartStopTest.h \
@@ -125,6 +128,7 @@
     activemq/test/openwire/OpenwireTransactionTest.h \
     activemq/test/openwire/OpenwireVirtualTopicTest.h \
     activemq/test/openwire/OpenwireXATransactionsTest.h \
+    activemq/test/stomp/StompAdvisoryTest.h \
     activemq/test/stomp/StompAsyncSenderTest.h \
     activemq/test/stomp/StompBulkMessageTest.h \
     activemq/test/stomp/StompCmsConnectionStartStopTest.h \
diff --git a/activemq-cpp/src/test-integration/TestRegistry.cpp b/activemq-cpp/src/test-integration/TestRegistry.cpp
index 5ac2c56..292cded 100644
--- a/activemq-cpp/src/test-integration/TestRegistry.cpp
+++ b/activemq-cpp/src/test-integration/TestRegistry.cpp
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-#include "activemq/test/openwire/OpenwireAdvisorysTest.h"
+#include "activemq/test/openwire/OpenwireAdvisoryTest.h"
 #include "activemq/test/openwire/OpenwireAsyncSenderTest.h"
 #include "activemq/test/openwire/OpenwireClientAckTest.h"
 #include "activemq/test/openwire/OpenwireCmsConnectionStartStopTest.h"
@@ -42,6 +42,7 @@
 #include "activemq/test/openwire/OpenwireSlowListenerTest.h"
 #include "activemq/test/openwire/OpenwireVirtualTopicTest.h"
 #include "activemq/test/openwire/OpenwireXATransactionsTest.h"
+#include "activemq/test/stomp/StompAdvisoryTest.h"
 #include "activemq/test/stomp/StompAsyncSenderTest.h"
 #include "activemq/test/stomp/StompBulkMessageTest.h"
 #include "activemq/test/stomp/StompCmsTemplateTest.h"
@@ -55,7 +56,7 @@
 #include "activemq/test/stomp/StompJmsMessageGroupsTest.h"
 
 // Openwire Tests
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireAdvisorysTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireAdvisoryTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireAsyncSenderTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireClientAckTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireCmsConnectionStartStopTest );
@@ -84,6 +85,7 @@
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireXATransactionsTest );
 
 // Stomp Tests
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::stomp::StompAdvisoryTest );
 //CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::stomp::StompAsyncSenderTest );
 //CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::stomp::StompBulkMessageTest );
 //CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::stomp::StompCmsTemplateTest );
diff --git a/activemq-cpp/src/test-integration/activemq/test/AdvisoryTest.cpp b/activemq-cpp/src/test-integration/activemq/test/AdvisoryTest.cpp
new file mode 100644
index 0000000..7b3db25
--- /dev/null
+++ b/activemq-cpp/src/test-integration/activemq/test/AdvisoryTest.cpp
@@ -0,0 +1,128 @@
+/*
+ * 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.
+ */
+
+#include "AdvisoryTest.h"
+
+#include <activemq/core/ActiveMQConnectionFactory.h>
+#include <activemq/core/ActiveMQConnection.h>
+#include <activemq/core/ActiveMQSession.h>
+#include <activemq/commands/ActiveMQTempTopic.h>
+#include <activemq/commands/ActiveMQTempQueue.h>
+#include <activemq/commands/ActiveMQMessage.h>
+#include <activemq/commands/ConnectionInfo.h>
+#include <activemq/commands/DestinationInfo.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/util/CMSListener.h>
+#include <activemq/util/IntegrationCommon.h>
+#include <activemq/util/AdvisorySupport.h>
+
+#include <decaf/lang/exceptions/ClassCastException.h>
+#include <decaf/lang/Pointer.h>
+#include <decaf/lang/Thread.h>
+#include <decaf/lang/Runnable.h>
+#include <decaf/util/concurrent/TimeUnit.h>
+#include <decaf/util/UUID.h>
+
+#include <cms/ConnectionFactory.h>
+#include <cms/Connection.h>
+#include <cms/Session.h>
+#include <cms/MessageConsumer.h>
+#include <cms/MessageProducer.h>
+#include <cms/MessageListener.h>
+#include <cms/ConnectionFactory.h>
+#include <cms/Connection.h>
+#include <cms/Message.h>
+#include <cms/Destination.h>
+#include <cms/TextMessage.h>
+
+#include <memory>
+
+using namespace cms;
+using namespace std;
+using namespace decaf;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
+using namespace activemq;
+using namespace activemq::core;
+using namespace activemq::util;
+using namespace activemq::commands;
+using namespace activemq::exceptions;
+using namespace activemq::test;
+
+////////////////////////////////////////////////////////////////////////////////
+AdvisoryTest::AdvisoryTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+AdvisoryTest::~AdvisoryTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void AdvisoryTest::testTempDestinationCompositeAdvisoryTopic() {
+
+    std::auto_ptr<ConnectionFactory> factory(
+        ConnectionFactory::createCMSConnectionFactory(getBrokerURL()));
+    CPPUNIT_ASSERT(factory.get() != NULL);
+
+    std::auto_ptr<Connection> connection(factory->createConnection());
+    CPPUNIT_ASSERT(connection.get() != NULL);
+
+    std::auto_ptr<Session> session(connection->createSession());
+    CPPUNIT_ASSERT(session.get() != NULL);
+
+    std::auto_ptr<ActiveMQDestination> composite(
+        AdvisorySupport::getTempDestinationCompositeAdvisoryTopic());
+
+    std::auto_ptr<MessageConsumer> consumer(session->createConsumer(dynamic_cast<Topic*>(composite.get())));
+
+    connection->start();
+
+    // Create one of each
+    std::auto_ptr<Topic> tempTopic(session->createTemporaryTopic());
+    std::auto_ptr<Queue> tempQueue(session->createTemporaryQueue());
+
+    // Create a consumer to ensure destination creation based on protocol.
+    std::auto_ptr<MessageConsumer> tempTopicConsumer(session->createConsumer(tempTopic.get()));
+    std::auto_ptr<MessageConsumer> tempQueueConsumer(session->createConsumer(tempQueue.get()));
+
+    // Should be an advisory for each
+    std::auto_ptr<cms::Message> advisory1(consumer->receive(2000));
+    CPPUNIT_ASSERT(advisory1.get() != NULL);
+    std::auto_ptr<cms::Message> advisory2(consumer->receive(2000));
+    CPPUNIT_ASSERT(advisory2.get() != NULL);
+
+    ActiveMQMessage* tempTopicAdvisory = dynamic_cast<ActiveMQMessage*>(advisory1.get());
+    ActiveMQMessage* tempQueueAdvisory = dynamic_cast<ActiveMQMessage*>(advisory2.get());
+
+    // Create one of each
+    std::auto_ptr<Topic> topic(session->createTopic(UUID::randomUUID().toString()));
+    std::auto_ptr<Queue> queue(session->createQueue(UUID::randomUUID().toString()));
+
+    // Create a producer to ensure destination creation based on protocol.
+    std::auto_ptr<MessageProducer> topicProducer(session->createProducer(topic.get()));
+    std::auto_ptr<MessageProducer> queueProducer(session->createProducer(queue.get()));
+
+    // Should not be an advisory for each
+    std::auto_ptr<cms::Message> advisory3(consumer->receive(500));
+    CPPUNIT_ASSERT(advisory3.get() == NULL);
+    std::auto_ptr<cms::Message> advisory4(consumer->receive(500));
+    CPPUNIT_ASSERT(advisory4.get() == NULL);
+
+    connection->close();
+}
diff --git a/activemq-cpp/src/test-integration/activemq/test/AdvisoryTest.h b/activemq-cpp/src/test-integration/activemq/test/AdvisoryTest.h
new file mode 100644
index 0000000..dd694a4
--- /dev/null
+++ b/activemq-cpp/src/test-integration/activemq/test/AdvisoryTest.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef _ACTIVEMQ_TEST_ADVISORYTEST_H_
+#define _ACTIVEMQ_TEST_ADVISORYTEST_H_
+
+#include <activemq/test/CMSTestFixture.h>
+
+namespace activemq {
+namespace test {
+
+    class AdvisoryTest : public CMSTestFixture {
+    public:
+
+        AdvisoryTest();
+        virtual ~AdvisoryTest();
+
+        void testTempDestinationCompositeAdvisoryTopic();
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_TEST_ADVISORYTEST_H_*/
diff --git a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisorysTest.cpp b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisoryTest.cpp
similarity index 76%
rename from activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisorysTest.cpp
rename to activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisoryTest.cpp
index 9edd9f9..5890c8b 100644
--- a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisorysTest.cpp
+++ b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisoryTest.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 
-#include "OpenwireAdvisorysTest.h"
-
 #include <activemq/core/ActiveMQConnectionFactory.h>
 #include <activemq/core/ActiveMQConnection.h>
 #include <activemq/core/ActiveMQSession.h>
@@ -43,6 +41,7 @@
 #include <cms/TextMessage.h>
 
 #include <memory>
+#include "OpenwireAdvisoryTest.h"
 
 using namespace cms;
 using namespace std;
@@ -59,58 +58,57 @@
 using namespace activemq::test::openwire;
 
 ////////////////////////////////////////////////////////////////////////////////
-OpenwireAdvisorysTest::OpenwireAdvisorysTest() {
+OpenwireAdvisoryTest::OpenwireAdvisoryTest() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-OpenwireAdvisorysTest::~OpenwireAdvisorysTest() {
+OpenwireAdvisoryTest::~OpenwireAdvisoryTest() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenwireAdvisorysTest::testConnectionAdvisories() {
+void OpenwireAdvisoryTest::testConnectionAdvisories() {
 
-    std::auto_ptr<ConnectionFactory> factory(
-        ConnectionFactory::createCMSConnectionFactory( getBrokerURL() ) );
-    CPPUNIT_ASSERT( factory.get() != NULL );
+    std::auto_ptr<ConnectionFactory> factory(ConnectionFactory::createCMSConnectionFactory(getBrokerURL()));
+    CPPUNIT_ASSERT(factory.get() != NULL);
 
-    std::auto_ptr<Connection> connection( factory->createConnection() );
-    CPPUNIT_ASSERT( connection.get() != NULL );
+    std::auto_ptr<Connection> connection(factory->createConnection());
+    CPPUNIT_ASSERT(connection.get() != NULL);
 
-    std::auto_ptr<Session> session( connection->createSession() );
-    CPPUNIT_ASSERT( session.get() != NULL );
+    std::auto_ptr<Session> session(connection->createSession());
+    CPPUNIT_ASSERT(session.get() != NULL);
 
-    std::auto_ptr<Destination> destination( session->createTopic("ActiveMQ.Advisory.Connection") );
-    std::auto_ptr<MessageConsumer> consumer( session->createConsumer( destination.get() ) );
+    std::auto_ptr<Destination> destination(session->createTopic("ActiveMQ.Advisory.Connection"));
+    std::auto_ptr<MessageConsumer> consumer(session->createConsumer(destination.get()));
 
     connection->start();
 
-    std::auto_ptr<Connection> otherConnection( factory->createConnection() );
-    CPPUNIT_ASSERT( otherConnection.get() != NULL );
+    std::auto_ptr<Connection> otherConnection(factory->createConnection());
+    CPPUNIT_ASSERT(otherConnection.get() != NULL);
     otherConnection->start();
 
     std::auto_ptr<cms::Message> message;
     int connectionInfoCount = 0;
 
     do {
-        message.reset( consumer->receive(3000) );
+        message.reset(consumer->receive(3000));
 
-        commands::Message* amqMessage = dynamic_cast<commands::Message*>( message.get() );
-        if(amqMessage != NULL) {
+        commands::Message* amqMessage = dynamic_cast<commands::Message*>(message.get());
+        if (amqMessage != NULL) {
             try {
                 Pointer<ConnectionInfo> connectionInfo =
                     amqMessage->getDataStructure().dynamicCast<commands::ConnectionInfo>();
 
-                if(connectionInfo != NULL) {
+                if (connectionInfo != NULL) {
                     connectionInfoCount++;
                 }
 
-            } catch(ClassCastException& ex) {
+            } catch (ClassCastException& ex) {
             }
         }
 
-    } while(message.get() != NULL);
+    } while (message.get() != NULL);
 
-    CPPUNIT_ASSERT_EQUAL(2, connectionInfoCount);
+    CPPUNIT_ASSERT(connectionInfoCount >= 2);
 
     otherConnection->close();
     connection->close();
@@ -162,10 +160,10 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenwireAdvisorysTest::testConcurrentTempDestCreation() {
+void OpenwireAdvisoryTest::testConcurrentTempDestCreation() {
 
     std::auto_ptr<ConnectionFactory> factory(
-        ConnectionFactory::createCMSConnectionFactory( getBrokerURL() ) );
+        ConnectionFactory::createCMSConnectionFactory(getBrokerURL()));
 
     ConnectionLoadThread thread1(factory.get());
     ConnectionLoadThread thread2(factory.get());
diff --git a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisorysTest.h b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisoryTest.h
similarity index 71%
rename from activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisorysTest.h
rename to activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisoryTest.h
index c92ebc3..bf0c509 100644
--- a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisorysTest.h
+++ b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAdvisoryTest.h
@@ -15,38 +15,33 @@
  * limitations under the License.
  */
 
-#ifndef _ACTIVEMQ_TEST_OPENWIRE_OPENWIREADVISORYSTEST_H_
-#define _ACTIVEMQ_TEST_OPENWIRE_OPENWIREADVISORYSTEST_H_
+#ifndef _ACTIVEMQ_TEST_OPENWIRE_OPENWIREADVISORYTEST_H_
+#define _ACTIVEMQ_TEST_OPENWIRE_OPENWIREADVISORYTEST_H_
 
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
+#include <activemq/test/AdvisoryTest.h>
 #include <activemq/util/IntegrationCommon.h>
 
 namespace activemq {
 namespace test {
 namespace openwire {
 
-    class OpenwireAdvisorysTest : public CppUnit::TestFixture {
+    class OpenwireAdvisoryTest : public AdvisoryTest {
 
-        CPPUNIT_TEST_SUITE( OpenwireAdvisorysTest );
+        CPPUNIT_TEST_SUITE( OpenwireAdvisoryTest );
         CPPUNIT_TEST( testConnectionAdvisories );
         CPPUNIT_TEST( testConcurrentTempDestCreation );
+        CPPUNIT_TEST( testTempDestinationCompositeAdvisoryTopic );
         CPPUNIT_TEST_SUITE_END();
 
     public:
 
-        OpenwireAdvisorysTest();
-
-        virtual ~OpenwireAdvisorysTest();
+        OpenwireAdvisoryTest();
+        virtual ~OpenwireAdvisoryTest();
 
         virtual std::string getBrokerURL() const {
             return activemq::util::IntegrationCommon::getInstance().getOpenwireURL();
         }
 
-        virtual void setUp() {}
-        virtual void tearDown() {}
-
         void testConnectionAdvisories();
         void testConcurrentTempDestCreation();
 
@@ -54,4 +49,4 @@
 
 }}}
 
-#endif /* _ACTIVEMQ_TEST_OPENWIRE_OPENWIREADVISORYSTEST_H_ */
+#endif /* _ACTIVEMQ_TEST_OPENWIRE_OPENWIREADVISORYTEST_H_ */
diff --git a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAsyncSenderTest.h b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAsyncSenderTest.h
index 54a95c9..0f8ad1c 100644
--- a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAsyncSenderTest.h
+++ b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireAsyncSenderTest.h
@@ -21,9 +21,9 @@
 #include <activemq/test/AsyncSenderTest.h>
 #include <activemq/util/IntegrationCommon.h>
 
-namespace activemq{
-namespace test{
-namespace openwire{
+namespace activemq {
+namespace test {
+namespace openwire {
 
     class OpenwireAsyncSenderTest : public AsyncSenderTest {
 
diff --git a/activemq-cpp/src/test-integration/activemq/test/stomp/StompAdvisoryTest.cpp b/activemq-cpp/src/test-integration/activemq/test/stomp/StompAdvisoryTest.cpp
new file mode 100644
index 0000000..2555a41
--- /dev/null
+++ b/activemq-cpp/src/test-integration/activemq/test/stomp/StompAdvisoryTest.cpp
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+#include <activemq/core/ActiveMQConnectionFactory.h>
+#include <activemq/core/ActiveMQConnection.h>
+#include <activemq/core/ActiveMQSession.h>
+#include <activemq/commands/Message.h>
+#include <activemq/commands/ConnectionInfo.h>
+#include <activemq/exceptions/ActiveMQException.h>
+
+#include <decaf/lang/exceptions/ClassCastException.h>
+#include <decaf/lang/Pointer.h>
+#include <decaf/lang/Thread.h>
+#include <decaf/lang/Runnable.h>
+#include <decaf/util/concurrent/TimeUnit.h>
+#include <decaf/util/UUID.h>
+
+#include <cms/ConnectionFactory.h>
+#include <cms/Connection.h>
+#include <cms/Session.h>
+#include <cms/MessageConsumer.h>
+#include <cms/MessageProducer.h>
+#include <cms/MessageListener.h>
+#include <cms/ConnectionFactory.h>
+#include <cms/Connection.h>
+#include <cms/Message.h>
+#include <cms/TextMessage.h>
+
+#include <memory>
+#include "StompAdvisoryTest.h"
+
+using namespace cms;
+using namespace std;
+using namespace decaf;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
+using namespace activemq;
+using namespace activemq::core;
+using namespace activemq::commands;
+using namespace activemq::exceptions;
+using namespace activemq::test;
+using namespace activemq::test::stomp;
+
+////////////////////////////////////////////////////////////////////////////////
+StompAdvisoryTest::StompAdvisoryTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+StompAdvisoryTest::~StompAdvisoryTest() {
+}
diff --git a/activemq-cpp/src/test-integration/activemq/test/stomp/StompAdvisoryTest.h b/activemq-cpp/src/test-integration/activemq/test/stomp/StompAdvisoryTest.h
new file mode 100644
index 0000000..ca09455
--- /dev/null
+++ b/activemq-cpp/src/test-integration/activemq/test/stomp/StompAdvisoryTest.h
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+#ifndef _ACTIVEMQ_TEST_STOMP_STOMPADVISORYTEST_H_
+#define _ACTIVEMQ_TEST_STOMP_STOMPADVISORYTEST_H_
+
+#include <activemq/test/AdvisoryTest.h>
+#include <activemq/util/IntegrationCommon.h>
+
+namespace activemq {
+namespace test {
+namespace stomp {
+
+    class StompAdvisoryTest : public AdvisoryTest {
+
+        CPPUNIT_TEST_SUITE( StompAdvisoryTest );
+        CPPUNIT_TEST( testTempDestinationCompositeAdvisoryTopic );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        StompAdvisoryTest();
+        virtual ~StompAdvisoryTest();
+
+        virtual std::string getBrokerURL() const {
+            return activemq::util::IntegrationCommon::getInstance().getStompURL();
+        }
+
+    };
+
+}}}
+
+#endif /* _ACTIVEMQ_TEST_STOMP_STOMPADVISORYTEST_H_ */