qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1591948 [2/3] - in /qpid/trunk/qpid/java: bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/ broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/ systests/src/main/java/org/apache/qpi...
Date Fri, 02 May 2014 15:29:26 GMT
Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/MessagesRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/MessagesRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/MessagesRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/MessagesRestTest.java Fri May  2 15:29:25 2014
@@ -21,7 +21,6 @@
 package org.apache.qpid.systest.rest;
 
 import java.io.IOException;
-import java.net.HttpURLConnection;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -85,7 +84,7 @@ public class MessagesRestTest extends Qp
     public void testGet() throws Exception
     {
         String queueName = getTestQueueName();
-        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/rest/message/test/" + queueName);
+        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/service/message/test/" + queueName);
         assertNotNull("Messages are not found", messages);
         assertEquals("Unexpected number of messages", MESSAGE_NUMBER, messages.size());
         int position = 0;
@@ -111,7 +110,7 @@ public class MessagesRestTest extends Qp
         // get message IDs
         List<Long> ids = getMesssageIds(queueName);
 
-        Map<String, Object> message = getRestTestHelper().getJsonAsMap("/rest/message/test/" + queueName + "/" + ids.get(0));
+        Map<String, Object> message = getRestTestHelper().getJsonAsMap("/service/message/test/" + queueName + "/" + ids.get(0));
         assertMessageAttributes(message);
         assertMessageAttributeValues(message, true);
 
@@ -121,7 +120,7 @@ public class MessagesRestTest extends Qp
         assertEquals("Unexpected message header", 0, headers.get("index"));
 
         Long lastMessageId = ids.get(ids.size() - 1);
-        message = getRestTestHelper().getJsonAsMap("/rest/message/test/" + queueName + "/" + lastMessageId);
+        message = getRestTestHelper().getJsonAsMap("/service/message/test/" + queueName + "/" + lastMessageId);
         assertMessageAttributes(message);
         assertEquals("Unexpected message attribute mimeType", "application/octet-stream", message.get("mimeType"));
         assertEquals("Unexpected message attribute size", 4, message.get("size"));
@@ -132,10 +131,7 @@ public class MessagesRestTest extends Qp
         assertEquals("Unexpected message header", "value", bytesMessageHeader.get("test"));
 
         // get content
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/rest/message-content/test/" + queueName + "/"
-                + lastMessageId, "GET");
-        connection.connect();
-        byte[] data = getRestTestHelper().readConnectionInputStream(connection);
+        byte[] data = getRestTestHelper().getBytes("/service/message-content/test/" + queueName + "/" + lastMessageId);
         assertTrue("Unexpected message", Arrays.equals(messageBytes, data));
 
     }
@@ -159,18 +155,17 @@ public class MessagesRestTest extends Qp
         }
 
         // move messages
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/rest/message/test/" + queueName, "POST");
 
         Map<String, Object> messagesData = new HashMap<String, Object>();
         messagesData.put("messages", movedMessageIds);
         messagesData.put("destinationQueue", queueName2);
         messagesData.put("move", Boolean.TRUE);
 
-        getRestTestHelper().writeJsonRequest(connection, messagesData);
-        assertEquals("Unexpected response code", 200, connection.getResponseCode());
+        int status = getRestTestHelper().submitRequest("/service/message/test/" + queueName, "POST", messagesData);
+        assertEquals("Unexpected response code", 200, status);
 
         // check messages on target queue
-        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/rest/message/test/" + queueName2);
+        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/service/message/test/" + queueName2);
         assertNotNull("Messages are not found", messages);
         assertEquals("Unexpected number of messages", movedMessageIds.size(), messages.size());
         for (Long id : movedMessageIds)
@@ -180,7 +175,7 @@ public class MessagesRestTest extends Qp
         }
 
         // check messages on original queue
-        messages = getRestTestHelper().getJsonAsList("/rest/message/test/" + queueName);
+        messages = getRestTestHelper().getJsonAsList("/service/message/test/" + queueName);
         assertNotNull("Messages are not found", messages);
         assertEquals("Unexpected number of messages", ids.size(), messages.size());
         for (Long id : ids)
@@ -214,17 +209,15 @@ public class MessagesRestTest extends Qp
         }
 
         // copy messages
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/rest/message/test/" + queueName, "POST");
-
         Map<String, Object> messagesData = new HashMap<String, Object>();
         messagesData.put("messages", copyMessageIds);
         messagesData.put("destinationQueue", queueName2);
 
-        getRestTestHelper().writeJsonRequest(connection, messagesData);
-        assertEquals("Unexpected response code", 200, connection.getResponseCode());
+        int responseCode = getRestTestHelper().submitRequest("/service/message/test/" + queueName, "POST", messagesData);
+        assertEquals("Unexpected response code", 200, responseCode);
 
         // check messages on target queue
-        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/rest/message/test/" + queueName2);
+        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/service/message/test/" + queueName2);
         assertNotNull("Messages are not found", messages);
         assertEquals("Unexpected number of messages", copyMessageIds.size(), messages.size());
         for (Long id : copyMessageIds)
@@ -234,7 +227,7 @@ public class MessagesRestTest extends Qp
         }
 
         // check messages on original queue
-        messages = getRestTestHelper().getJsonAsList("/rest/message/test/" + queueName);
+        messages = getRestTestHelper().getJsonAsList("/service/message/test/" + queueName);
         assertNotNull("Messages are not found", messages);
         assertEquals("Unexpected number of messages", MESSAGE_NUMBER, messages.size());
         for (Long id : ids)
@@ -272,13 +265,11 @@ public class MessagesRestTest extends Qp
         }
 
         // delete messages
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection(
-                "/rest/message/test/" + queueName + "?" + queryString.toString(), "DELETE");
-        connection.connect();
-        assertEquals("Unexpected response code", 200, connection.getResponseCode());
+        int responseCode = getRestTestHelper().submitRequest("/service/message/test/" + queueName + "?" + queryString.toString(), "DELETE");
+        assertEquals("Unexpected response code", 200, responseCode);
 
         // check messages on queue
-        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/rest/message/test/" + queueName);
+        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/service/message/test/" + queueName);
         assertNotNull("Messages are not found", messages);
         assertEquals("Unexpected number of messages", ids.size(), messages.size());
         for (Long id : ids)
@@ -295,7 +286,7 @@ public class MessagesRestTest extends Qp
 
     private List<Long> getMesssageIds(String queueName) throws IOException, JsonParseException, JsonMappingException
     {
-        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/rest/message/test/" + queueName);
+        List<Map<String, Object>> messages = getRestTestHelper().getJsonAsList("/service/message/test/" + queueName);
         List<Long> ids = new ArrayList<Long>();
         for (Map<String, Object> message : messages)
         {

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java Fri May  2 15:29:25 2014
@@ -42,7 +42,7 @@ public class PortRestTest extends QpidRe
 {
     public void testGet() throws Exception
     {
-        List<Map<String, Object>> ports = getRestTestHelper().getJsonAsList("/rest/port/");
+        List<Map<String, Object>> ports = getRestTestHelper().getJsonAsList("port/");
         assertNotNull("Port data cannot be null", ports);
         assertEquals("Unexpected number of ports", 2, ports.size());
 
@@ -59,14 +59,14 @@ public class PortRestTest extends QpidRe
 
     public void testGetPort() throws Exception
     {
-        List<Map<String, Object>> ports = getRestTestHelper().getJsonAsList("/rest/port/");
+        List<Map<String, Object>> ports = getRestTestHelper().getJsonAsList("port/");
         assertNotNull("Ports data cannot be null", ports);
         assertEquals("Unexpected number of ports", 2, ports.size());
         for (Map<String, Object> portMap : ports)
         {
             String portName = (String) portMap.get(Port.NAME);
             assertNotNull("Port name attribute is not found", portName);
-            Map<String, Object> portData = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + URLDecoder.decode(portName, "UTF-8"));
+            Map<String, Object> portData = getRestTestHelper().getJsonAsSingletonList("port/" + URLDecoder.decode(portName, "UTF-8"));
             assertNotNull("Port " + portName + " is not found", portData);
             Asserts.assertPortAttributes(portData);
         }
@@ -80,10 +80,10 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.PORT, findFreePort());
         attributes.put(Port.AUTHENTICATION_PROVIDER, TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response code", 201, responseCode);
 
-        List<Map<String, Object>> portDetails = getRestTestHelper().getJsonAsList("/rest/port/" + portName);
+        List<Map<String, Object>> portDetails = getRestTestHelper().getJsonAsList("port/" + portName);
         assertNotNull("Port details cannot be null", portDetails);
         assertEquals("Unexpected number of ports with name " + portName, 1, portDetails.size());
         Map<String, Object> port = portDetails.get(0);
@@ -92,7 +92,7 @@ public class PortRestTest extends QpidRe
         // make sure that port is there after broker restart
         restartBroker();
 
-        portDetails = getRestTestHelper().getJsonAsList("/rest/port/" + portName);
+        portDetails = getRestTestHelper().getJsonAsList("port/" + portName);
         assertNotNull("Port details cannot be null", portDetails);
         assertEquals("Unexpected number of ports with name " + portName, 1, portDetails.size());
     }
@@ -105,10 +105,10 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.PORT, findFreePort());
         attributes.put(Port.PROTOCOLS, Collections.singleton(Protocol.RMI));
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response code", 201, responseCode);
 
-        List<Map<String, Object>> portDetails = getRestTestHelper().getJsonAsList("/rest/port/" + portName);
+        List<Map<String, Object>> portDetails = getRestTestHelper().getJsonAsList("port/" + portName);
         assertNotNull("Port details cannot be null", portDetails);
         assertEquals("Unexpected number of ports with name " + portName, 1, portDetails.size());
         Map<String, Object> port = portDetails.get(0);
@@ -117,7 +117,7 @@ public class PortRestTest extends QpidRe
         // make sure that port is there after broker restart
         restartBroker();
 
-        portDetails = getRestTestHelper().getJsonAsList("/rest/port/" + portName);
+        portDetails = getRestTestHelper().getJsonAsList("port/" + portName);
         assertNotNull("Port details cannot be null", portDetails);
         assertEquals("Unexpected number of ports with name " + portName, 1, portDetails.size());
         port = portDetails.get(0);
@@ -130,7 +130,7 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.PORT, findFreePort());
         attributes.put(Port.PROTOCOLS, Collections.singleton(Protocol.RMI));
 
-        responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Adding of a second RMI port should fail", 409, responseCode);
     }
 
@@ -142,10 +142,10 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.PORT, findFreePort());
         attributes.put(Port.AUTHENTICATION_PROVIDER, TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response code for port creation", 201, responseCode);
 
-        List<Map<String, Object>> portDetails = getRestTestHelper().getJsonAsList("/rest/port/" + portName);
+        List<Map<String, Object>> portDetails = getRestTestHelper().getJsonAsList("port/" + portName);
         assertNotNull("Port details cannot be null", portDetails);
         assertEquals("Unexpected number of ports with name " + portName, 1, portDetails.size());
         Map<String, Object> port = portDetails.get(0);
@@ -155,14 +155,14 @@ public class PortRestTest extends QpidRe
         authProviderAttributes.put(AuthenticationProvider.TYPE, AnonymousAuthenticationManager.PROVIDER_TYPE);
         authProviderAttributes.put(AuthenticationProvider.NAME, TestBrokerConfiguration.ENTRY_NAME_ANONYMOUS_PROVIDER);
 
-        responseCode = getRestTestHelper().submitRequest("/rest/authenticationprovider/" + TestBrokerConfiguration.ENTRY_NAME_ANONYMOUS_PROVIDER, "PUT", authProviderAttributes);
+        responseCode = getRestTestHelper().submitRequest("authenticationprovider/" + TestBrokerConfiguration.ENTRY_NAME_ANONYMOUS_PROVIDER, "PUT", authProviderAttributes);
         assertEquals("Unexpected response code for authentication provider creation", 201, responseCode);
 
         attributes = new HashMap<String, Object>(port);
         attributes.put(Port.AUTHENTICATION_PROVIDER, TestBrokerConfiguration.ENTRY_NAME_ANONYMOUS_PROVIDER);
         attributes.put(Port.PROTOCOLS, Collections.singleton(Protocol.AMQP_0_9_1));
 
-        responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response code for port update", 200, responseCode);
     }
 
@@ -174,10 +174,10 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.TRANSPORTS, Collections.singleton(Transport.SSL));
         attributes.put(Port.KEY_STORE, TestBrokerConfiguration.ENTRY_NAME_SSL_KEYSTORE);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Transport has not been changed to SSL " , 200, responseCode);
 
-        Map<String, Object> port = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + portName);
+        Map<String, Object> port = getRestTestHelper().getJsonAsSingletonList("port/" + portName);
 
         @SuppressWarnings("unchecked")
         Collection<String> transports = (Collection<String>) port.get(Port.TRANSPORTS);
@@ -195,7 +195,7 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.NAME, portName);
         attributes.put(Port.TRANSPORTS, Collections.singleton(Transport.SSL));
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Creation of SSL port without keystore should fail", 409, responseCode);
     }
 
@@ -210,16 +210,16 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.KEY_STORE, TestBrokerConfiguration.ENTRY_NAME_SSL_KEYSTORE);
         attributes.put(Port.TRUST_STORES, Collections.singleton(TestBrokerConfiguration.ENTRY_NAME_SSL_TRUSTSTORE));
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("SSL port was not added", 201, responseCode);
 
         attributes.put(Port.NEED_CLIENT_AUTH, true);
         attributes.put(Port.WANT_CLIENT_AUTH, true);
 
-        responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Attributes for need/want client auth are not set", 200, responseCode);
 
-        Map<String, Object> port = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + portName);
+        Map<String, Object> port = getRestTestHelper().getJsonAsSingletonList("port/" + portName);
         assertEquals("Unexpected " + Port.NEED_CLIENT_AUTH, true, port.get(Port.NEED_CLIENT_AUTH));
         assertEquals("Unexpected " + Port.WANT_CLIENT_AUTH, true, port.get(Port.WANT_CLIENT_AUTH));
         assertEquals("Unexpected " + Port.KEY_STORE, TestBrokerConfiguration.ENTRY_NAME_SSL_KEYSTORE, port.get(Port.KEY_STORE));
@@ -232,7 +232,7 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.NAME, portName);
         attributes.put(Port.TRANSPORTS, Collections.singleton(Transport.TCP));
 
-        responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Should not be able to change transport to TCP without reseting of attributes for need/want client auth", 409, responseCode);
 
         attributes = new HashMap<String, Object>();
@@ -241,10 +241,10 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.NEED_CLIENT_AUTH, false);
         attributes.put(Port.WANT_CLIENT_AUTH, false);
 
-        responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Should be able to change transport to TCP ", 200, responseCode);
 
-        port = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + portName);
+        port = getRestTestHelper().getJsonAsSingletonList("port/" + portName);
         assertEquals("Unexpected " + Port.NEED_CLIENT_AUTH, false, port.get(Port.NEED_CLIENT_AUTH));
         assertEquals("Unexpected " + Port.WANT_CLIENT_AUTH, false, port.get(Port.WANT_CLIENT_AUTH));
 
@@ -260,13 +260,13 @@ public class PortRestTest extends QpidRe
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(Port.NAME, portName);
         attributes.put(Port.NEED_CLIENT_AUTH, true);
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response when trying to set 'needClientAuth' on non-SSL port", 409, responseCode);
 
         attributes = new HashMap<String, Object>();
         attributes.put(Port.NAME, portName);
         attributes.put(Port.WANT_CLIENT_AUTH, true);
-        responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response when trying to set 'wantClientAuth' on non-SSL port", 409, responseCode);
     }
 
@@ -276,16 +276,16 @@ public class PortRestTest extends QpidRe
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(Port.NAME, portName);
         attributes.put(Port.AUTHENTICATION_PROVIDER, "non-existing");
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response when trying to change auth provider to non-existing one", 409, responseCode);
 
         attributes = new HashMap<String, Object>();
         attributes.put(Port.NAME, portName);
         attributes.put(Port.AUTHENTICATION_PROVIDER, ANONYMOUS_AUTHENTICATION_PROVIDER);
-        responseCode = getRestTestHelper().submitRequest("/rest/port/" + portName, "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("port/" + portName, "PUT", attributes);
         assertEquals("Unexpected response when trying to change auth provider to existing one", 200, responseCode);
 
-        Map<String, Object> port = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + portName);
+        Map<String, Object> port = getRestTestHelper().getJsonAsSingletonList("port/" + portName);
         assertEquals("Unexpected auth provider", ANONYMOUS_AUTHENTICATION_PROVIDER, port.get(Port.AUTHENTICATION_PROVIDER));
     }
 
@@ -297,17 +297,17 @@ public class PortRestTest extends QpidRe
         getRestTestHelper().setUsernameAndPassword(BrokerOptions.MANAGEMENT_MODE_USER_NAME, MANAGEMENT_MODE_PASSWORD);
 
         String ampqPortName = TestBrokerConfiguration.ENTRY_NAME_AMQP_PORT;
-        Map<String, Object> portData = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + URLDecoder.decode(ampqPortName, "UTF-8"));
+        Map<String, Object> portData = getRestTestHelper().getJsonAsSingletonList("port/" + URLDecoder.decode(ampqPortName, "UTF-8"));
         Asserts.assertPortAttributes(portData, State.QUIESCED);
     }
 
     public void testNewPortQuiescedIfPortNumberWasUsed() throws Exception
     {
         String ampqPortName = TestBrokerConfiguration.ENTRY_NAME_AMQP_PORT;
-        Map<String, Object> portData = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + URLDecoder.decode(ampqPortName, "UTF-8"));
+        Map<String, Object> portData = getRestTestHelper().getJsonAsSingletonList("port/" + URLDecoder.decode(ampqPortName, "UTF-8"));
         int amqpPort = (Integer)portData.get(Port.PORT);
 
-        int deleteResponseCode = getRestTestHelper().submitRequest("/rest/port/" + ampqPortName, "DELETE", null);
+        int deleteResponseCode = getRestTestHelper().submitRequest("port/" + ampqPortName, "DELETE");
         assertEquals("Port deletion should be allowed", 200, deleteResponseCode);
 
         String newPortName = "reused-port";
@@ -316,10 +316,10 @@ public class PortRestTest extends QpidRe
         attributes.put(Port.PORT, amqpPort);  // reuses port that was previously in use
         attributes.put(Port.AUTHENTICATION_PROVIDER, TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/port/" + newPortName, "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("port/" + newPortName, "PUT", attributes);
         assertEquals("Unexpected response code for port creation", 201, responseCode);
 
-        portData = getRestTestHelper().getJsonAsSingletonList("/rest/port/" + URLDecoder.decode(newPortName, "UTF-8"));
+        portData = getRestTestHelper().getJsonAsSingletonList("port/" + URLDecoder.decode(newPortName, "UTF-8"));
         Asserts.assertPortAttributes(portData, State.QUIESCED);
     }
 }

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesProviderRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesProviderRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesProviderRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesProviderRestTest.java Fri May  2 15:29:25 2014
@@ -83,13 +83,13 @@ public class PreferencesProviderRestTest
 
     public void testCreateAndGetProvider() throws Exception
     {
-        List<Map<String, Object>> providerDetails = getRestTestHelper().getJsonAsList("/rest/preferencesprovider");
+        List<Map<String, Object>> providerDetails = getRestTestHelper().getJsonAsList("preferencesprovider");
         assertEquals("Unexpected number of providers", 0, providerDetails.size());
 
         createPreferencesProvider(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER, "test1");
         createPreferencesProvider(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "-2", "test2");
 
-        providerDetails = getRestTestHelper().getJsonAsList("/rest/preferencesprovider");
+        providerDetails = getRestTestHelper().getJsonAsList("preferencesprovider");
         assertEquals("Unexpected number of providers", 2, providerDetails.size());
 
         for (Map<String, Object> provider : providerDetails)
@@ -98,12 +98,12 @@ public class PreferencesProviderRestTest
         }
 
         Map<String, Object> provider = getRestTestHelper().getJsonAsSingletonList(
-                "/rest/preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/test1");
+                "preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/test1");
         assertProvider(provider);
         assertEquals("Unexpected provider name ", "test1", provider.get(PreferencesProvider.NAME));
 
         Map<String, Object> provider2 = getRestTestHelper().getJsonAsSingletonList(
-                "/rest/preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "-2/test2");
+                "preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "-2/test2");
         assertProvider(provider);
         assertEquals("Unexpected provider name ", "test2", provider2.get(PreferencesProvider.NAME));
     }
@@ -111,12 +111,12 @@ public class PreferencesProviderRestTest
     public void testDeleteProvider() throws Exception
     {
         createPreferencesProvider(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER, "test1");
-        String providerUrl = "/rest/preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/test1";
+        String providerUrl = "preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/test1";
         Map<String, Object> provider = getRestTestHelper().getJsonAsSingletonList(providerUrl);
         assertProvider(provider);
         assertEquals("Unexpected provider name ", "test1", provider.get(PreferencesProvider.NAME));
 
-        int responseCode = getRestTestHelper().submitRequest(providerUrl, "DELETE", null);
+        int responseCode = getRestTestHelper().submitRequest(providerUrl, "DELETE");
         assertEquals("Failed to delete preferences provider", 200, responseCode);
 
         List<Map<String, Object>> providerDetails = getRestTestHelper().getJsonAsList(providerUrl);
@@ -126,7 +126,7 @@ public class PreferencesProviderRestTest
     public void testUpdateProvider() throws Exception
     {
         createPreferencesProvider(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER, "test1");
-        String providerUrl = "/rest/preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/test1";
+        String providerUrl = "preferencesprovider/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/test1";
         Map<String, Object> provider = getRestTestHelper().getJsonAsSingletonList(providerUrl);
         assertProvider(provider);
         assertEquals("Unexpected provider name ", "test1", provider.get(PreferencesProvider.NAME));
@@ -190,7 +190,7 @@ public class PreferencesProviderRestTest
         attributes.put(FileSystemPreferencesProvider.PATH, file.getAbsolutePath());
 
         int responseCode = getRestTestHelper().submitRequest(
-                "/rest/preferencesprovider/" + authenticationProvider + "/" + providerName, "PUT", attributes);
+                "preferencesprovider/" + authenticationProvider + "/" + providerName, "PUT", attributes);
         assertEquals("Unexpected response code", 201, responseCode);
     }
 

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesRestTest.java Fri May  2 15:29:25 2014
@@ -73,7 +73,7 @@ public class PreferencesRestTest extends
 
     public void testGetPreferences() throws Exception
     {
-        Map<String, Object> preferences = getRestTestHelper().getJsonAsMap("/rest/preferences");
+        Map<String, Object> preferences = getRestTestHelper().getJsonAsMap("/service/preferences");
         assertEquals("Unexpected number of preferences", 2, preferences.size());
         assertEquals("Unexpected language preference", "en", preferences.get("language"));
         assertEquals("Unexpected saveTabs preference", true, preferences.get("saveTabs"));
@@ -85,10 +85,10 @@ public class PreferencesRestTest extends
         additionalPreferences.put("timezone", "Europe/London");
         additionalPreferences.put("test", 1);
 
-        int status = getRestTestHelper().submitRequest("/rest/preferences", "POST", additionalPreferences);
+        int status = getRestTestHelper().submitRequest("/service/preferences", "POST", additionalPreferences);
         assertEquals("Unexpected response code", 200, status);
 
-        Map<String, Object> preferences = getRestTestHelper().getJsonAsMap("/rest/preferences");
+        Map<String, Object> preferences = getRestTestHelper().getJsonAsMap("/service/preferences");
         assertEquals("Unexpected number of preferences", 4, preferences.size());
         assertEquals("Unexpected language preference", "en", preferences.get("language"));
         assertEquals("Unexpected saveTabs preference", true, preferences.get("saveTabs"));
@@ -102,10 +102,10 @@ public class PreferencesRestTest extends
         additionalPreferences.put("timezone", "Europe/London");
         additionalPreferences.put("test", 1);
 
-        int status = getRestTestHelper().submitRequest("/rest/preferences", "PUT", additionalPreferences);
+        int status = getRestTestHelper().submitRequest("/service/preferences", "PUT", additionalPreferences);
         assertEquals("Unexpected response code", 200, status);
 
-        Map<String, Object> preferences = getRestTestHelper().getJsonAsMap("/rest/preferences");
+        Map<String, Object> preferences = getRestTestHelper().getJsonAsMap("/service/preferences");
         assertEquals("Unexpected number of preferences", 2, preferences.size());
         assertEquals("Unexpected timezone preference", "Europe/London", preferences.get("timezone"));
         assertEquals("Unexpected test preference", 1, preferences.get("test"));

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/QueueRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/QueueRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/QueueRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/QueueRestTest.java Fri May  2 15:29:25 2014
@@ -21,7 +21,6 @@
 package org.apache.qpid.systest.rest;
 
 import java.io.IOException;
-import java.net.HttpURLConnection;
 import java.net.URLDecoder;
 import java.util.HashMap;
 import java.util.List;
@@ -82,7 +81,7 @@ public class QueueRestTest extends QpidR
     public void testGetVirtualHostQueues() throws Exception
     {
         String queueName = getTestQueueName();
-        List<Map<String, Object>> queues = getRestTestHelper().getJsonAsList("/rest/queue/test");
+        List<Map<String, Object>> queues = getRestTestHelper().getJsonAsList("queue/test");
         assertEquals("Unexpected number of queues", 1, queues.size());
         String[] expectedQueues = new String[]{queueName};
 
@@ -104,7 +103,7 @@ public class QueueRestTest extends QpidR
     public void testGetByName() throws Exception
     {
         String queueName = getTestQueueName();
-        Map<String, Object> queueDetails = getRestTestHelper().getJsonAsSingletonList("/rest/queue/test/test/" + queueName);
+        Map<String, Object> queueDetails = getRestTestHelper().getJsonAsSingletonList("queue/test/test/" + queueName);
         Asserts.assertQueue(queueName, "standard", queueDetails);
         assertStatistics(queueDetails);
 
@@ -130,7 +129,7 @@ public class QueueRestTest extends QpidR
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(Queue.NAME, queueName);
 
-        String queueUrl = "/rest/queue/test/test/" + queueName;
+        String queueUrl = "queue/test/test/" + queueName;
         int responseCode =  getRestTestHelper().submitRequest(queueUrl, "PUT", attributes);
         assertEquals("Queue was not created", 201, responseCode);
 
@@ -172,7 +171,7 @@ public class QueueRestTest extends QpidR
             createBinding(bindingName, exchanges[i], queueName);
         }
 
-        Map<String, Object> queueDetails = getRestTestHelper().getJsonAsSingletonList("/rest/queue/test/test/" + queueName);
+        Map<String, Object> queueDetails = getRestTestHelper().getJsonAsSingletonList("queue/test/test/" + queueName);
         Asserts.assertQueue(queueName, "standard", queueDetails);
 
         @SuppressWarnings("unchecked")
@@ -193,19 +192,14 @@ public class QueueRestTest extends QpidR
 
     private void createBinding(String bindingName, String exchangeName, String queueName) throws IOException
     {
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection(
-                "/rest/binding/test/test/" + URLDecoder.decode(exchangeName, "UTF-8") + "/" + queueName + "/" + bindingName,
-                "PUT");
-
         Map<String, Object> bindingData = new HashMap<String, Object>();
         bindingData.put(Binding.NAME, bindingName);
         bindingData.put(Binding.EXCHANGE, exchangeName);
         bindingData.put(Binding.QUEUE, queueName);
 
-        getRestTestHelper().writeJsonRequest(connection, bindingData);
-        assertEquals("Unexpected response code", 201, connection.getResponseCode());
-
-        connection.disconnect();
+        String url = "binding/test/test/" + URLDecoder.decode(exchangeName, "UTF-8") + "/" + queueName + "/" + bindingName;
+        int responseCode = getRestTestHelper().submitRequest(url, "PUT", bindingData);
+        assertEquals("Unexpected response code", 201, responseCode);
     }
 
     private void assertConsumer(Map<String, Object> consumer)

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java Fri May  2 15:29:25 2014
@@ -30,6 +30,7 @@ import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -57,7 +58,6 @@ import org.codehaus.jackson.JsonParseExc
 import org.codehaus.jackson.map.JsonMappingException;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.type.TypeReference;
-
 import org.apache.qpid.server.BrokerOptions;
 import org.apache.qpid.server.model.AuthenticationProvider;
 import org.apache.qpid.server.model.Binding;
@@ -68,6 +68,12 @@ import org.apache.qpid.test.utils.TestBr
 
 public class RestTestHelper
 {
+
+    private static final TypeReference<List<LinkedHashMap<String, Object>>> TYPE_LIST_OF_LINKED_HASH_MAPS = new TypeReference<List<LinkedHashMap<String, Object>>>()
+    {
+    };
+    public static final String API_BASE = "/api/latest/";
+
     private static final Logger LOGGER = Logger.getLogger(RestTestHelper.class);
     private static final String CERT_ALIAS_APP1 = "app1";
 
@@ -116,6 +122,10 @@ public class RestTestHelper
 
     public HttpURLConnection openManagementConnection(String path, String method) throws IOException
     {
+        if (!path.startsWith("/"))
+        {
+            path = API_BASE + path;
+        }
         URL url = getManagementURL(path);
         HttpURLConnection httpCon = (HttpURLConnection) url.openConnection();
 
@@ -179,13 +189,8 @@ public class RestTestHelper
             JsonParseException, JsonMappingException
     {
         byte[] data = readConnectionInputStream(connection);
-String dataAsString = new String(data);
         ObjectMapper mapper = new ObjectMapper();
-
-        TypeReference<List<LinkedHashMap<String, Object>>> typeReference = new TypeReference<List<LinkedHashMap<String, Object>>>()
-        {
-        };
-        List<Map<String, Object>> providedObject = mapper.readValue(new ByteArrayInputStream(data), typeReference);
+        List<Map<String, Object>> providedObject = mapper.readValue(new ByteArrayInputStream(data), TYPE_LIST_OF_LINKED_HASH_MAPS);
         return providedObject;
     }
 
@@ -203,7 +208,7 @@ String dataAsString = new String(data);
         return providedObject;
     }
 
-    public byte[] readConnectionInputStream(HttpURLConnection connection) throws IOException
+    private byte[] readConnectionInputStream(HttpURLConnection connection) throws IOException
     {
         InputStream is = connection.getInputStream();
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -220,7 +225,7 @@ String dataAsString = new String(data);
         return baos.toByteArray();
     }
 
-    public void writeJsonRequest(HttpURLConnection connection, Map<String, Object> data) throws JsonGenerationException,
+    private void writeJsonRequest(HttpURLConnection connection, Map<String, Object> data) throws JsonGenerationException,
             JsonMappingException, IOException
     {
         ObjectMapper mapper = new ObjectMapper();
@@ -296,7 +301,7 @@ String dataAsString = new String(data);
     public void createNewGroupMember(String groupProviderName, String groupName, String memberName, int responseCode) throws IOException
     {
         HttpURLConnection connection = openManagementConnection(
-                "/rest/groupmember/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8") + "/" +  URLDecoder.decode(memberName, "UTF-8"),
+                "groupmember/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8") + "/" +  URLDecoder.decode(memberName, "UTF-8"),
                 "PUT");
 
         Map<String, Object> groupMemberData = new HashMap<String, Object>();
@@ -316,7 +321,7 @@ String dataAsString = new String(data);
     public void removeMemberFromGroup(String groupProviderName, String groupName, String memberName, int responseCode) throws IOException
     {
         HttpURLConnection connection = openManagementConnection(
-                "/rest/groupmember/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8") + "/" +  URLDecoder.decode(memberName, "UTF-8"),
+                "groupmember/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8") + "/" +  URLDecoder.decode(memberName, "UTF-8"),
                 "DELETE");
 
         Assert.assertEquals("Unexpected response code", responseCode, connection.getResponseCode());
@@ -349,7 +354,7 @@ String dataAsString = new String(data);
     public void createGroup(String groupName, String groupProviderName, int responseCode) throws IOException
     {
         HttpURLConnection connection = openManagementConnection(
-                "/rest/group/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8"),
+                "group/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8"),
                 "PUT");
 
         Map<String, Object> groupData = new HashMap<String, Object>();
@@ -367,7 +372,7 @@ String dataAsString = new String(data);
 
     public void createOrUpdateUser(String username, String password, int responseCode) throws IOException
     {
-        HttpURLConnection connection = openManagementConnection("/rest/user/"
+        HttpURLConnection connection = openManagementConnection("user/"
                 + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/" + username, "PUT");
 
         Map<String, Object> data = new HashMap<String, Object>();
@@ -382,7 +387,7 @@ String dataAsString = new String(data);
     public void removeGroup(String groupName, String groupProviderName, int responseCode) throws IOException
     {
         HttpURLConnection connection = openManagementConnection(
-                "/rest/group/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8"),
+                "group/" + URLDecoder.decode(groupProviderName, "UTF-8") + "/"+ URLDecoder.decode(groupName, "UTF-8"),
                 "DELETE");
 
         Assert.assertEquals("Unexpected response code", responseCode, connection.getResponseCode());
@@ -396,7 +401,7 @@ String dataAsString = new String(data);
 
     public void removeUserById(String id) throws IOException
     {
-        HttpURLConnection connection = openManagementConnection("/rest/user/"
+        HttpURLConnection connection = openManagementConnection("user/"
                 + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "?id=" + id, "DELETE");
         Assert.assertEquals("Unexpected response code", HttpServletResponse.SC_OK, connection.getResponseCode());
         connection.disconnect();
@@ -404,7 +409,7 @@ String dataAsString = new String(data);
 
     public void removeUser(String username, int responseCode) throws IOException
     {
-        HttpURLConnection connection = openManagementConnection("/rest/user/"
+        HttpURLConnection connection = openManagementConnection("user/"
                 + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/" + username, "DELETE");
         Assert.assertEquals("Unexpected response code", responseCode, connection.getResponseCode());
         connection.disconnect();
@@ -505,6 +510,25 @@ String dataAsString = new String(data);
         return responseCode;
     }
 
+    public int submitRequest(String url, String method) throws IOException
+    {
+        return submitRequest(url, method, (byte[])null);
+    }
+
+    public int submitRequest(String url, String method, byte[] parameters) throws IOException
+    {
+        HttpURLConnection connection = openManagementConnection(url, method);
+        if (parameters != null)
+        {
+            OutputStream os = connection.getOutputStream();
+            os.write(parameters);
+            os.flush();
+        }
+        int responseCode = connection.getResponseCode();
+        connection.disconnect();
+        return responseCode;
+    }
+
     public byte[] getBytes(String path) throws IOException
     {
         HttpURLConnection connection = openManagementConnection(path, "GET");
@@ -526,15 +550,16 @@ String dataAsString = new String(data);
             Map<String, Object> queueData = new HashMap<String, Object>();
             queueData.put(Queue.NAME, queueName);
             queueData.put(Queue.DURABLE, Boolean.FALSE);
-            int responseCode = submitRequest("/rest/queue/test/test/" + queueName, "PUT", queueData);
+            int responseCode = submitRequest("queue/test/test/" + queueName, "PUT", queueData);
             Assert.assertEquals("Unexpected response code creating queue" + queueName, 201, responseCode);
 
             Map<String, Object> bindingData = new HashMap<String, Object>();
             bindingData.put(Binding.NAME, queueName);
             bindingData.put(Binding.QUEUE, queueName);
             bindingData.put(Binding.EXCHANGE, "amq.direct");
-            responseCode = submitRequest("/rest/binding/test/test/amq.direct/" + queueName + "/" + queueName, "PUT", queueData);
+            responseCode = submitRequest("binding/test/test/amq.direct/" + queueName + "/" + queueName, "PUT", queueData);
             Assert.assertEquals("Unexpected response code binding queue " + queueName, 201, responseCode);
         }
     }
+
 }

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/SaslRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/SaslRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/SaslRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/SaslRestTest.java Fri May  2 15:29:25 2014
@@ -62,7 +62,7 @@ public class SaslRestTest extends QpidRe
     {
         startBrokerNow();
 
-        Map<String, Object> saslData = getRestTestHelper().getJsonAsMap("/rest/sasl");
+        Map<String, Object> saslData = getRestTestHelper().getJsonAsMap("/service/sasl");
         assertNotNull("mechanisms attribute is not found", saslData.get("mechanisms"));
 
         @SuppressWarnings("unchecked")
@@ -80,7 +80,7 @@ public class SaslRestTest extends QpidRe
         configureBase64MD5FilePrincipalDatabase();
         startBrokerNow();
 
-        Map<String, Object> saslData = getRestTestHelper().getJsonAsMap("/rest/sasl");
+        Map<String, Object> saslData = getRestTestHelper().getJsonAsMap("/service/sasl");
         assertNotNull("mechanisms attribute is not found", saslData.get("mechanisms"));
 
         @SuppressWarnings("unchecked")
@@ -102,18 +102,18 @@ public class SaslRestTest extends QpidRe
         String responseData = Base64.encodeBase64String(responseBytes);
         String parameters= "mechanism=PLAIN&response=" + responseData;
 
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/rest/sasl", "POST");
+        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/service/sasl", "POST");
         OutputStream os = connection.getOutputStream();
         os.write(parameters.getBytes());
         os.flush();
 
-         int code = connection.getResponseCode();
+        int code = getRestTestHelper().submitRequest("/service/sasl", "POST", parameters.getBytes());
         assertEquals("Unexpected response code", 200, code);
 
         List<String> cookies = connection.getHeaderFields().get("Set-Cookie");
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertEquals("Unexpected user", "admin", response2.get("user"));
@@ -127,7 +127,7 @@ public class SaslRestTest extends QpidRe
         String responseData = Base64.encodeBase64String(responseBytes);
         String parameters= "mechanism=PLAIN&response=" + responseData;
 
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/rest/sasl", "POST");
+        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/service/sasl", "POST");
         OutputStream os = connection.getOutputStream();
         os.write(parameters.getBytes());
         os.flush();
@@ -138,7 +138,7 @@ public class SaslRestTest extends QpidRe
         List<String> cookies = connection.getHeaderFields().get("Set-Cookie");
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertNull("Unexpected user", response2.get("user"));
@@ -152,7 +152,7 @@ public class SaslRestTest extends QpidRe
         String responseData = Base64.encodeBase64String(responseBytes);
         String parameters= "mechanism=PLAIN&response=" + responseData;
 
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/rest/sasl", "POST");
+        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/service/sasl", "POST");
         OutputStream os = connection.getOutputStream();
         os.write(parameters.getBytes());
         os.flush();
@@ -163,7 +163,7 @@ public class SaslRestTest extends QpidRe
         List<String> cookies = connection.getHeaderFields().get("Set-Cookie");
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertNull("Unexpected user", response2.get("user"));
@@ -182,7 +182,7 @@ public class SaslRestTest extends QpidRe
         assertEquals("Unexpected response code", 200, code);
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertEquals("Unexpected user", "admin", response2.get("user"));
@@ -201,7 +201,7 @@ public class SaslRestTest extends QpidRe
         assertEquals("Unexpected response code", 401, code);
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertNull("Unexpected user", response2.get("user"));
@@ -220,7 +220,7 @@ public class SaslRestTest extends QpidRe
         assertEquals("Unexpected response code", 401, code);
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertNull("Unexpected user",  response2.get("user"));
@@ -240,7 +240,7 @@ public class SaslRestTest extends QpidRe
         assertEquals("Unexpected response code", 200, code);
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertEquals("Unexpected user", "admin", response2.get("user"));
@@ -259,7 +259,7 @@ public class SaslRestTest extends QpidRe
         assertEquals("Unexpected response code", 401, code);
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertNull("Unexpected user", response2.get("user"));
@@ -278,7 +278,7 @@ public class SaslRestTest extends QpidRe
         assertEquals("Unexpected response code", 401, code);
 
         // request authenticated user details
-        connection = getRestTestHelper().openManagementConnection("/rest/sasl", "GET");
+        connection = getRestTestHelper().openManagementConnection("/service/sasl", "GET");
         applyCookiesToConnection(cookies, connection);
         Map<String, Object> response2 = getRestTestHelper().readJsonResponseAsMap(connection);
         assertNull("Unexpected user", response2.get("user"));
@@ -286,14 +286,14 @@ public class SaslRestTest extends QpidRe
 
     private HttpURLConnection requestSasServerChallenge(String mechanism) throws IOException
     {
-        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/rest/sasl", "POST");
+        HttpURLConnection connection = getRestTestHelper().openManagementConnection("/service/sasl", "POST");
         OutputStream os = connection.getOutputStream();
         os.write(("mechanism=" + mechanism).getBytes());
         os.flush();
         return connection;
     }
 
-    private int authenticateUser(HttpURLConnection requestChallengeConnection, String userName, String userPassword, String mechanism)
+    public int authenticateUser(HttpURLConnection requestChallengeConnection, String userName, String userPassword, String mechanism)
             throws IOException, JsonParseException, JsonMappingException, Exception
     {
         // get the response
@@ -311,7 +311,7 @@ public class SaslRestTest extends QpidRe
         String requestParameters = ("id=" + response.get("id") + "&response=" + responseData);
 
         // re-open connection
-        HttpURLConnection authenticateConnection = getRestTestHelper().openManagementConnection("/rest/sasl", "POST");
+        HttpURLConnection authenticateConnection = getRestTestHelper().openManagementConnection("/service/sasl", "POST");
 
         // set cookies to use the same server session
         applyCookiesToConnection(cookies, authenticateConnection);

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/StructureRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/StructureRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/StructureRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/StructureRestTest.java Fri May  2 15:29:25 2014
@@ -39,7 +39,7 @@ public class StructureRestTest extends Q
 
     public void testGet() throws Exception
     {
-        Map<String, Object> structure = getRestTestHelper().getJsonAsMap("/rest/structure");
+        Map<String, Object> structure = getRestTestHelper().getJsonAsMap("/service/structure");
         assertNotNull("Structure data cannot be null", structure);
         assertNode(structure, "Broker");
 

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java Fri May  2 15:29:25 2014
@@ -69,7 +69,7 @@ public class TrustStoreRestTest extends 
         createTrustStore(name, true);
         assertNumberOfTrustStores(2);
 
-        List<Map<String, Object>> trustStores = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        List<Map<String, Object>> trustStores = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details cannot be null", trustStores);
 
         assertTrustStoreAttributes(trustStores.get(0), name, TestSSLConstants.TRUSTSTORE, true);
@@ -85,10 +85,10 @@ public class TrustStoreRestTest extends 
         createTrustStore(name, false);
         assertNumberOfTrustStores(2);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/truststore/" + name , "DELETE", null);
+        int responseCode = getRestTestHelper().submitRequest("truststore/" + name , "DELETE");
         assertEquals("Unexpected response code for provider deletion", 200, responseCode);
 
-        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details should not be null", trustStore);
         assertTrue("details should be empty as the truststore no longer exists", trustStore.isEmpty());
 
@@ -125,17 +125,17 @@ public class TrustStoreRestTest extends 
         //verify the truststore is there
         assertNumberOfTrustStores(2);
 
-        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details should not be null", trustStore);
         assertTrustStoreAttributes(trustStore.get(0), name, TestSSLConstants.TRUSTSTORE, false);
 
         //try to delete it, which should fail as it is in use
-        int responseCode = getRestTestHelper().submitRequest("/rest/truststore/" + name , "DELETE", null);
+        int responseCode = getRestTestHelper().submitRequest("truststore/" + name , "DELETE");
         assertEquals("Unexpected response code for provider deletion", 409, responseCode);
 
         //check its still there
         assertNumberOfTrustStores(2);
-        trustStore = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        trustStore = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details should not be null", trustStore);
         assertTrustStoreAttributes(trustStore.get(0), name, TestSSLConstants.TRUSTSTORE, false);
     }
@@ -154,10 +154,10 @@ public class TrustStoreRestTest extends 
         attributes.put(TrustStore.NAME, name);
         attributes.put(FileTrustStore.PATH, TestSSLConstants.TRUSTSTORE);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/truststore/" + name , "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("truststore/" + name , "PUT", attributes);
         assertEquals("Unexpected response code for truststore update", 200, responseCode);
 
-        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details should not be null", trustStore);
 
         assertTrustStoreAttributes(trustStore.get(0), name, TestSSLConstants.TRUSTSTORE, false);
@@ -177,10 +177,10 @@ public class TrustStoreRestTest extends 
         attributes.put(TrustStore.NAME, name);
         attributes.put(FileTrustStore.PATH, "does.not.exist");
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/truststore/" + name , "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("truststore/" + name , "PUT", attributes);
         assertEquals("Unexpected response code for trust store update", 409, responseCode);
 
-        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details should not be null", trustStore);
 
         //verify the details remain unchanged
@@ -202,10 +202,10 @@ public class TrustStoreRestTest extends 
         attributes.put(TrustStore.NAME, name);
         attributes.put(FileTrustStore.PEERS_ONLY, true);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/truststore/" + name , "PUT", attributes);
+        int responseCode = getRestTestHelper().submitRequest("truststore/" + name , "PUT", attributes);
         assertEquals("Unexpected response code for trust store update", 200, responseCode);
 
-        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        List<Map<String, Object>> trustStore = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details should not be null", trustStore);
 
         assertTrustStoreAttributes(trustStore.get(0), name, TestSSLConstants.TRUSTSTORE, true);
@@ -215,10 +215,10 @@ public class TrustStoreRestTest extends 
         attributes.put(TrustStore.NAME, name);
         attributes.put(FileTrustStore.PEERS_ONLY, null);
 
-        responseCode = getRestTestHelper().submitRequest("/rest/truststore/" + name , "PUT", attributes);
+        responseCode = getRestTestHelper().submitRequest("truststore/" + name , "PUT", attributes);
         assertEquals("Unexpected response code for trust store update", 200, responseCode);
 
-        trustStore = getRestTestHelper().getJsonAsList("/rest/truststore/" + name);
+        trustStore = getRestTestHelper().getJsonAsList("truststore/" + name);
         assertNotNull("details should not be null", trustStore);
 
         assertTrustStoreAttributes(trustStore.get(0), name, TestSSLConstants.TRUSTSTORE, false);
@@ -227,7 +227,7 @@ public class TrustStoreRestTest extends 
     private List<Map<String, Object>> assertNumberOfTrustStores(int numberOfTrustStores) throws IOException,
     JsonParseException, JsonMappingException
     {
-        List<Map<String, Object>> trustStores = getRestTestHelper().getJsonAsList("/rest/truststore");
+        List<Map<String, Object>> trustStores = getRestTestHelper().getJsonAsList("truststore");
         assertNotNull("trust stores should not be null", trustStores);
         assertEquals("Unexpected number of trust stores", numberOfTrustStores, trustStores.size());
 
@@ -243,7 +243,7 @@ public class TrustStoreRestTest extends 
         trustStoreAttributes.put(FileTrustStore.PASSWORD, TestSSLConstants.TRUSTSTORE_PASSWORD);
         trustStoreAttributes.put(FileTrustStore.PEERS_ONLY, peersOnly);
 
-        int responseCode = getRestTestHelper().submitRequest("/rest/truststore/" + name, "PUT", trustStoreAttributes);
+        int responseCode = getRestTestHelper().submitRequest("truststore/" + name, "PUT", trustStoreAttributes);
         assertEquals("Unexpected response code", 201, responseCode);
     }
 

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserPreferencesRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserPreferencesRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserPreferencesRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserPreferencesRestTest.java Fri May  2 15:29:25 2014
@@ -79,7 +79,7 @@ public class UserPreferencesRestTest ext
     public void testGetUserPreferences() throws Exception
     {
         Map<String, Object> preferences = getRestTestHelper().getJsonAsMap(
-                "/rest/userpreferences/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/webadmin");
+                "/service/userpreferences/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/webadmin");
         assertEquals("Unexpected number of preferences", 2, preferences.size());
         assertEquals("Unexpected language preference", "en", preferences.get("language"));
         assertEquals("Unexpected saveTabs preference", true, preferences.get("saveTabs"));
@@ -88,7 +88,7 @@ public class UserPreferencesRestTest ext
     public void testGetUserListForAuthenticationProvider() throws Exception
     {
         List<Map<String, Object>> users = getRestTestHelper().getJsonAsList(
-                "/rest/userpreferences/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER);
+                "/service/userpreferences/" + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER);
         assertEquals("Unexpected number of users", 2, users.size());
         String[] expectedUsers = { "webadmin", "admin" };
         for (int i = 0; i < expectedUsers.length; i++)
@@ -100,7 +100,7 @@ public class UserPreferencesRestTest ext
 
     public void testGetUserList() throws Exception
     {
-        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/rest/userpreferences");
+        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/service/userpreferences");
         assertEquals("Unexpected number of users", 2, users.size());
         String[] expectedUsers = { "webadmin", "admin" };
         for (int i = 0; i < expectedUsers.length; i++)
@@ -113,11 +113,11 @@ public class UserPreferencesRestTest ext
     public void testDeleteUser() throws Exception
     {
         int status = getRestTestHelper().submitRequest(
-                "/rest/userpreferences?user="
+                "/service/userpreferences?user="
                         + URLEncoder.encode(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/webadmin",
-                                "UTF-8"), "DELETE", null);
+                                "UTF-8"), "DELETE");
         assertEquals("Unexpected status ", 200, status);
-        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/rest/userpreferences");
+        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/service/userpreferences");
         assertEquals("Unexpected number of users", 1, users.size());
         Map<String, Object> user = findUser("admin", users);
         assertNotNull("User admin is not found", user);
@@ -126,12 +126,12 @@ public class UserPreferencesRestTest ext
 
     public void testDeleteMultipleUser() throws Exception
     {
-        int status = getRestTestHelper().submitRequest("/rest/userpreferences?user="
+        int status = getRestTestHelper().submitRequest("/service/userpreferences?user="
                 + URLEncoder.encode(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/webadmin", "UTF-8")
                 + "&user=" + URLEncoder.encode(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/admin", "UTF-8"),
-                "DELETE", null);
+                "DELETE");
         assertEquals("Unexpected status ", 200, status);
-        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/rest/userpreferences");
+        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/service/userpreferences");
         assertEquals("Unexpected number of users", 0, users.size());
     }
 

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserRestTest.java?rev=1591948&r1=1591947&r2=1591948&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserRestTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserRestTest.java Fri May  2 15:29:25 2014
@@ -39,7 +39,7 @@ public class UserRestTest extends QpidRe
 
     public void testGet() throws Exception
     {
-        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/rest/user");
+        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("user");
         assertNotNull("Users cannot be null", users);
         assertTrue("Unexpected number of users", users.size() > 1);
         for (Map<String, Object> user : users)
@@ -50,7 +50,7 @@ public class UserRestTest extends QpidRe
 
     public void testGetUserByName() throws Exception
     {
-        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/rest/user");
+        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("user");
         assertNotNull("Users cannot be null", users);
         assertTrue("Unexpected number of users", users.size() > 1);
         for (Map<String, Object> user : users)
@@ -58,7 +58,7 @@ public class UserRestTest extends QpidRe
             assertNotNull("Attribute " + User.ID, user.get(User.ID));
             String userName = (String) user.get(User.NAME);
             assertNotNull("Attribute " + User.NAME, userName);
-            Map<String, Object> userDetails = getRestTestHelper().getJsonAsSingletonList("/rest/user/"
+            Map<String, Object> userDetails = getRestTestHelper().getJsonAsSingletonList("user/"
                     + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/" + userName);
             assertUser(userDetails);
             assertEquals("Unexpected user name", userName, userDetails.get(User.NAME));
@@ -70,7 +70,7 @@ public class UserRestTest extends QpidRe
         String userName = getTestName();
         getRestTestHelper().createOrUpdateUser(userName, "newPassword");
 
-        Map<String, Object> userDetails = getRestTestHelper().getJsonAsSingletonList("/rest/user/"
+        Map<String, Object> userDetails = getRestTestHelper().getJsonAsSingletonList("user/"
                 + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/" + userName);
         assertUser(userDetails);
         assertEquals("Unexpected user name", userName, userDetails.get(User.NAME));
@@ -81,13 +81,13 @@ public class UserRestTest extends QpidRe
         String userName = getTestName();
         getRestTestHelper().createOrUpdateUser(userName, "newPassword");
 
-        Map<String, Object> userDetails = getRestTestHelper().getJsonAsSingletonList("/rest/user/"
+        Map<String, Object> userDetails = getRestTestHelper().getJsonAsSingletonList("user/"
                 + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/" + userName);
         String id = (String) userDetails.get(User.ID);
 
         getRestTestHelper().removeUserById(id);
 
-        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("/rest/user/"
+        List<Map<String, Object>> users = getRestTestHelper().getJsonAsList("user/"
                 + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + "/" + userName);
         assertEquals("User should be deleted", 0, users.size());
     }



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


Mime
View raw message