Remove deprecated stuff

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/60d1e3d0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/60d1e3d0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/60d1e3d0

Branch: refs/heads/master
Commit: 60d1e3d0c460620891f9d75752f72cb95c0f8146
Parents: 976a08f
Author: Jens Reimann <jreim...@redhat.com>
Authored: Wed Apr 12 08:48:00 2017 +0200
Committer: Andrea Cosentino <anco...@gmail.com>
Committed: Wed Apr 12 10:55:26 2017 +0200

----------------------------------------------------------------------
 .../apache/camel/component/milo/NodeIds.java    | 222 +++++++++++++++++++
 .../milo/client/MiloClientEndpoint.java         |  64 ------
 .../milo/server/MiloServerComponent.java        |  16 --
 .../milo/server/MiloServerEndpoint.java         |   7 -
 .../MonitorItemMultiConnectionsCertTest.java    |  12 +-
 .../milo/MonitorItemMultiConnectionsTest.java   |   9 +-
 .../camel/component/milo/MonitorItemTest.java   |   3 +-
 .../apache/camel/component/milo/NodeIdTest.java |   8 -
 .../camel/component/milo/WriteClientTest.java   |  32 ++-
 9 files changed, 247 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
new file mode 100644
index 0000000..1f61ebb
--- /dev/null
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
@@ -0,0 +1,222 @@
+/**
+ * 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.camel.component.milo;
+
+import java.util.Base64;
+import java.util.Objects;
+import java.util.UUID;
+
+import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
+
+/**
+ * Helper class to work with node IDs
+ */
+public final class NodeIds {
+       private NodeIds() {
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final String namespace, final String 
node) {
+               Objects.requireNonNull(namespace);
+               Objects.requireNonNull(node);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final String namespace, final int node) {
+               Objects.requireNonNull(namespace);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final String namespace, final UUID node) 
{
+               Objects.requireNonNull(namespace);
+               Objects.requireNonNull(node);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final String namespace, final ByteString 
node) {
+               Objects.requireNonNull(namespace);
+               Objects.requireNonNull(node);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final int namespace, final String node) {
+               Objects.requireNonNull(namespace);
+               Objects.requireNonNull(node);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final int namespace, final int node) {
+               Objects.requireNonNull(namespace);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final int namespace, final UUID node) {
+               Objects.requireNonNull(namespace);
+               Objects.requireNonNull(node);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       /**
+        * Create an attribute value for the "node" attribute
+        * 
+        * @param namespace
+        *            the namespace to use
+        * @param node
+        *            the node ID
+        * @return the value ready to append to a "node" URI attribute
+        */
+       public static String nodeValue(final int namespace, final ByteString 
node) {
+               Objects.requireNonNull(namespace);
+               Objects.requireNonNull(node);
+
+               final StringBuilder builder = new StringBuilder("RAW(");
+               appendNamespace(builder, namespace);
+               builder.append(';');
+               appendNodeId(builder, node);
+               builder.append(')');
+               return builder.toString();
+       }
+
+       private static void appendNamespace(final StringBuilder builder, final 
String namespace) {
+               builder.append("nsu=").append(namespace);
+       }
+
+       private static void appendNamespace(final StringBuilder builder, final 
int namespace) {
+               
builder.append("ns=").append(Integer.toUnsignedString(namespace));
+       }
+
+       private static void appendNodeId(final StringBuilder builder, final 
String nodeId) {
+               builder.append("s=").append(nodeId);
+       }
+
+       private static void appendNodeId(final StringBuilder builder, final int 
nodeId) {
+               builder.append("i=").append(Integer.toUnsignedString(nodeId));
+       }
+
+       private static void appendNodeId(final StringBuilder builder, final 
UUID nodeId) {
+               builder.append("g=").append(nodeId);
+       }
+
+       private static void appendNodeId(final StringBuilder builder, final 
ByteString nodeId) {
+               
builder.append("b=").append(Base64.getEncoder().encodeToString(nodeId.bytes()));
+       }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
index cc2b804..6b0b923 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.milo.client;
 
-import static 
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.ushort;
-
 import java.util.Objects;
 
 import org.apache.camel.Consumer;
@@ -43,33 +41,6 @@ public class MiloClientEndpoint extends DefaultEndpoint 
implements MiloClientIte
        private final String endpointUri;
 
        /**
-        * The node ID as string ID **deprecated**
-        *
-        * @deprecated Use "node" instead
-        */
-       @UriParam
-       @Deprecated
-       private String nodeId;
-
-       /**
-        * The namespace as URI **deprecated**
-        *
-        * @deprecated Use "node" instead
-        */
-       @UriParam
-       @Deprecated
-       private String namespaceUri;
-
-       /**
-        * The namespace as numeric index **deprecated**
-        *
-        * @deprecated Use "node" instead
-        */
-       @UriParam
-       @Deprecated
-       private Integer namespaceIndex;
-
-       /**
         * The node definition (see Node ID)
         */
        @UriParam
@@ -150,10 +121,6 @@ public class MiloClientEndpoint extends DefaultEndpoint 
implements MiloClientIte
                        result = PartialNodeId.fromExpandedNodeId(this.node);
                }
 
-               if (result == null && this.nodeId != null) {
-                       result = new PartialNodeId(this.nodeId);
-               }
-
                if (result == null) {
                        throw new IllegalStateException("Missing or invalid 
node id configuration");
                } else {
@@ -169,13 +136,6 @@ public class MiloClientEndpoint extends DefaultEndpoint 
implements MiloClientIte
                        result = NamespaceId.fromExpandedNodeId(this.node);
                }
 
-               if (result == null && this.namespaceIndex != null) {
-                       result = new NamespaceId(ushort(this.namespaceIndex));
-               }
-               if (result == null && this.namespaceUri != null) {
-                       result = new NamespaceId(this.namespaceUri);
-               }
-
                if (result == null) {
                        throw new IllegalStateException("Missing or invalid 
node id configuration");
                } else {
@@ -183,30 +143,6 @@ public class MiloClientEndpoint extends DefaultEndpoint 
implements MiloClientIte
                }
        }
 
-       public String getNodeId() {
-               return this.nodeId;
-       }
-
-       public void setNodeId(final String nodeId) {
-               this.nodeId = nodeId;
-       }
-
-       public String getNamespaceUri() {
-               return this.namespaceUri;
-       }
-
-       public void setNamespaceUri(final String namespaceUri) {
-               this.namespaceUri = namespaceUri;
-       }
-
-       public Integer getNamespaceIndex() {
-               return this.namespaceIndex;
-       }
-
-       public void setNamespaceIndex(final int namespaceIndex) {
-               this.namespaceIndex = namespaceIndex;
-       }
-
        public void setNode(final String node) {
                if (node == null) {
                        this.node = null;

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerComponent.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerComponent.java
index 5a23cef..7b39f9a 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerComponent.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerComponent.java
@@ -447,20 +447,4 @@ public class MiloServerComponent extends DefaultComponent {
        public void setDefaultCertificateValidator(final File 
certificatesBaseDir) {
                this.certificateValidator = () -> new 
DefaultCertificateValidator(certificatesBaseDir);
        }
-
-       /**
-        * Validator for client certificates using default file based approach
-        */
-       public void setDefaultCertificateExistingValidator(final File 
trustedDir) {
-               throw new UnsupportedOperationException("Can be implemented 
after fix in upstream");
-
-               /*
-                * checkDispose(this.certificateValidator);
-                *
-                * this.certificateValidator = new
-                * DefaultCertificateValidator(trustedDir, null, null);
-                * 
this.serverConfig.setCertificateValidator(this.certificateValidator);
-                */
-       }
-
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
index b398174..6abacf2 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
@@ -64,12 +64,6 @@ class MiloServerEndpoint extends DefaultEndpoint {
        }
 
        @Override
-       protected void doShutdown() throws Exception {
-               // FIXME: need to call back to component?
-               super.doShutdown();
-       }
-
-       @Override
        public Producer createProducer() throws Exception {
                return new MiloServerProducer(this, this.item);
        }
@@ -102,5 +96,4 @@ class MiloServerEndpoint extends DefaultEndpoint {
        public String getItemId() {
                return this.itemId;
        }
-
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
index 24f3c79..3328902 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
@@ -41,17 +41,17 @@ public class MonitorItemMultiConnectionsCertTest extends 
AbstractMiloServerTest
        private static final String MILO_SERVER_ITEM_1 = "milo-server:myitem1";
 
        // with key
-       private static final String MILO_CLIENT_ITEM_C1_1 = 
"milo-client:tcp://foo:bar@localhost:12685?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI
+       private static final String MILO_CLIENT_ITEM_C1_1 = 
"milo-client:tcp://foo:bar@localhost:12685?node="
+                       + 
NodeIds.nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, "items-myitem1")
                        + 
"&keyStoreUrl=file:src/test/resources/cert/cert.p12&keyStorePassword=pwd1&keyPassword=pwd1";
 
        // with wrong password
-       private static final String MILO_CLIENT_ITEM_C2_1 = 
"milo-client:tcp://foo:bar2@localhost:12685?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
+       private static final String MILO_CLIENT_ITEM_C2_1 = 
"milo-client:tcp://foo:bar2@localhost:12685?node="
+                       + 
NodeIds.nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, "items-myitem1");
 
        // without key, clientId=1
-       private static final String MILO_CLIENT_ITEM_C3_1 = 
"milo-client:tcp://foo:bar@localhost:12685?clientId=1&nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
+       private static final String MILO_CLIENT_ITEM_C3_1 = 
"milo-client:tcp://foo:bar@localhost:12685?clientId=1&node="
+                       + 
NodeIds.nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, "items-myitem1");
 
        private static final String MOCK_TEST_1 = "mock:test1";
        private static final String MOCK_TEST_2 = "mock:test2";

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsTest.java
index 7a4df66..791e4e4 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsTest.java
@@ -34,14 +34,11 @@ public class MonitorItemMultiConnectionsTest extends 
AbstractMiloServerTest {
 
        private static final String MILO_SERVER_ITEM_1 = "milo-server:myitem1";
 
-       private static final String MILO_CLIENT_ITEM_C1_1 = 
"milo-client:tcp://foo:bar@localhost:12685?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
+       private static final String MILO_CLIENT_ITEM_C1_1 = 
"milo-client:tcp://foo:bar@localhost:12685?node=" + 
NodeIds.nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, "items-myitem1");
 
-       private static final String MILO_CLIENT_ITEM_C2_1 = 
"milo-client:tcp://foo:bar2@localhost:12685?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
+       private static final String MILO_CLIENT_ITEM_C2_1 = 
"milo-client:tcp://foo:bar2@localhost:12685?node=" + 
NodeIds.nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, "items-myitem1");
 
-       private static final String MILO_CLIENT_ITEM_C3_1 = 
"milo-client:tcp://foo2:bar@localhost:12685?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
+       private static final String MILO_CLIENT_ITEM_C3_1 = 
"milo-client:tcp://foo2:bar@localhost:12685?node=" + 
NodeIds.nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, "items-myitem1");
 
        private static final String MOCK_TEST_1 = "mock:test1";
        private static final String MOCK_TEST_2 = "mock:test2";

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemTest.java
index 4aded9c..6c11b64 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemTest.java
@@ -34,8 +34,7 @@ public class MonitorItemTest extends AbstractMiloServerTest {
 
        private static final String MILO_SERVER_ITEM_1 = "milo-server:myitem1";
 
-       private static final String MILO_CLIENT_ITEM_C1_1 = 
"milo-client:tcp://foo:bar@localhost:12685?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
+       private static final String MILO_CLIENT_ITEM_C1_1 = 
"milo-client:tcp://foo:bar@localhost:12685?node=" + 
NodeIds.nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, "items-myitem1");
 
        private static final String MOCK_TEST_1 = "mock:test1";
 

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/test/java/org/apache/camel/component/milo/NodeIdTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/NodeIdTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/NodeIdTest.java
index 526abc7..a832f87 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/NodeIdTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/NodeIdTest.java
@@ -33,14 +33,6 @@ import org.junit.Test;
 public class NodeIdTest extends AbstractMiloServerTest {
 
        @Test
-       public void testLegacy() {
-               
testUri("milo-client:tcp://foo:bar@localhost:12685?nodeId=items-myitem1&namespaceUri="
 + DEFAULT_NAMESPACE_URI,
-                               DEFAULT_NAMESPACE_URI, "items-myitem1");
-               
testUri("milo-client:tcp://foo:bar@localhost:12685?nodeId=items-myitem1&namespaceIndex=1",
 ushort(1),
-                               "items-myitem1");
-       }
-
-       @Test
        public void testFull1() {
                final String s = String.format("nsu=%s;s=%s", 
DEFAULT_NAMESPACE_URI, "item-1");
                
testUri("milo-client:tcp://foo:bar@localhost:12685?samplingInterval=1000&node=RAW("
 + s + ")",

http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
index 40c85e5..4216038 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/WriteClientTest.java
@@ -1,11 +1,12 @@
-/*
- * Copyright (C) 2016 Jens Reimann <jreim...@redhat.com> and others
- *
- * Licensed 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
+/**
+ * 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
+ *      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,
@@ -13,9 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.component.milo;
 
+import static org.apache.camel.component.milo.NodeIds.nodeValue;
+
 import org.apache.camel.EndpointInject;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
@@ -42,15 +44,11 @@ public class WriteClientTest extends AbstractMiloServerTest 
{
        private static final String MILO_CLIENT_BASE_C1 = 
"milo-client:tcp://foo:bar@localhost:12685";
        private static final String MILO_CLIENT_BASE_C2 = 
"milo-client:tcp://foo2:bar2@localhost:12685";
 
-       private static final String MILO_CLIENT_ITEM_C1_1 = MILO_CLIENT_BASE_C1 
+ "?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
-       private static final String MILO_CLIENT_ITEM_C1_2 = MILO_CLIENT_BASE_C1 
+ "?nodeId=items-myitem2&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
-
-       private static final String MILO_CLIENT_ITEM_C2_1 = MILO_CLIENT_BASE_C2 
+ "?nodeId=items-myitem1&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
-       private static final String MILO_CLIENT_ITEM_C2_2 = MILO_CLIENT_BASE_C2 
+ "?nodeId=items-myitem2&namespaceUri="
-                       + MiloServerComponent.DEFAULT_NAMESPACE_URI;
+       private static final String MILO_CLIENT_ITEM_C1_1 = MILO_CLIENT_BASE_C1 
+ "?node=" + nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, 
"items-myitem1");
+       private static final String MILO_CLIENT_ITEM_C1_2 = MILO_CLIENT_BASE_C1 
+ "?node=" + nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, 
"items-myitem2");
+       
+       private static final String MILO_CLIENT_ITEM_C2_1 = MILO_CLIENT_BASE_C2 
+ "?node=" + nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, 
"items-myitem1");
+       private static final String MILO_CLIENT_ITEM_C2_2 = MILO_CLIENT_BASE_C2 
+ "?node=" + nodeValue(MiloServerComponent.DEFAULT_NAMESPACE_URI, 
"items-myitem2");
 
        private static final String MOCK_TEST_1 = "mock:test1";
        private static final String MOCK_TEST_2 = "mock:test2";

Reply via email to