QPID-8158: [Broker-J] [System Tests] Remove qpid-systest module including 
QpidBrokerTestCase and its dependecies


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/768f4fb0
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/768f4fb0
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/768f4fb0

Branch: refs/heads/master
Commit: 768f4fb0961ff82ef49e09062ce19a7176b7d86a
Parents: 1c38d9e
Author: Alex Rudyy <oru...@apache.org>
Authored: Wed Apr 11 16:09:15 2018 +0100
Committer: Alex Rudyy <oru...@apache.org>
Committed: Wed Apr 11 17:27:23 2018 +0100

----------------------------------------------------------------------
 bdbstore/systests/pom.xml                       |   5 -
 pom.xml                                         |   7 -
 qpid-perftests-systests/pom.xml                 |   5 -
 .../org/apache/qpid/test/utils/TestUtils.java   |  55 ++
 systests/etc/bin/fail.py                        |  88 --
 systests/etc/config-systests.json               |  66 --
 systests/etc/groups-systests                    |  29 -
 systests/etc/log.properties                     |  21 -
 systests/pom.xml                                | 206 ----
 .../org/apache/qpid/systest/rest/Asserts.java   |  45 -
 .../qpid/systest/rest/QpidRestTestCase.java     |  85 --
 .../qpid/systest/rest/RestTestHelper.java       | 620 ------------
 .../qpid/test/utils/AbstractBrokerHolder.java   | 261 -----
 .../qpid/test/utils/BrokerCommandHelper.java    |  87 --
 .../apache/qpid/test/utils/BrokerHolder.java    |  50 -
 .../qpid/test/utils/InternalBrokerHolder.java   | 207 ----
 .../utils/LogbackSocketPortNumberDefiner.java   |  43 -
 .../java/org/apache/qpid/test/utils/Piper.java  | 121 ---
 .../qpid/test/utils/QpidBrokerTestCase.java     | 974 -------------------
 .../apache/qpid/test/utils/ReflectionUtils.java | 259 -----
 .../test/utils/ReflectionUtilsException.java    |  44 -
 .../qpid/test/utils/SpawnedBrokerHolder.java    | 530 ----------
 .../test/utils/TestBrokerConfiguration.java     | 493 ----------
 .../org/apache/qpid/test/utils/TestUtils.java   |  55 --
 systests/src/main/resources/logback-test.xml    |  59 --
 25 files changed, 55 insertions(+), 4360 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/bdbstore/systests/pom.xml
----------------------------------------------------------------------
diff --git a/bdbstore/systests/pom.xml b/bdbstore/systests/pom.xml
index b81f3b1..4c52564 100644
--- a/bdbstore/systests/pom.xml
+++ b/bdbstore/systests/pom.xml
@@ -39,11 +39,6 @@
 
     <dependency>
       <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-systests</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
       <artifactId>qpid-bdbstore</artifactId>
     </dependency>
 

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5b56477..a60b7e4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -191,7 +191,6 @@
 
     <module>qpid-systests-parent</module>
     <module>qpid-test-utils</module>
-    <module>systests</module>
     <module>systests/systests-utils</module>
     <module>systests/qpid-systests-jms-core</module>
     <module>systests/qpid-systests-jms_1.1</module>
@@ -396,12 +395,6 @@
 
       <dependency>
         <groupId>org.apache.qpid</groupId>
-        <artifactId>qpid-systests</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.qpid</groupId>
         <artifactId>qpid-test-utils</artifactId>
         <version>${project.version}</version>
       </dependency>

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/qpid-perftests-systests/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-perftests-systests/pom.xml b/qpid-perftests-systests/pom.xml
index 57b724f..570292d 100644
--- a/qpid-perftests-systests/pom.xml
+++ b/qpid-perftests-systests/pom.xml
@@ -39,11 +39,6 @@
       <artifactId>qpid-perftests</artifactId>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-systests</artifactId>
-    </dependency>
-
     <!-- client deps -->
     <dependency>
       <groupId>org.apache.qpid</groupId>

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/TestUtils.java
----------------------------------------------------------------------
diff --git 
a/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/TestUtils.java 
b/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/TestUtils.java
new file mode 100644
index 0000000..5069e20
--- /dev/null
+++ b/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/TestUtils.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.test.utils;
+
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+
+public class TestUtils
+{
+    public static String dumpThreads()
+    {
+        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
+        ThreadInfo[] threadInfos = threadMXBean.dumpAllThreads(true, true);
+        StringBuilder dump = new StringBuilder();
+        dump.append(String.format("%n"));
+        for (ThreadInfo threadInfo : threadInfos)
+        {
+            dump.append(threadInfo);
+        }
+
+        long[] deadLocks = threadMXBean.findDeadlockedThreads();
+        if (deadLocks != null && deadLocks.length > 0)
+        {
+            ThreadInfo[] deadlockedThreads = 
threadMXBean.getThreadInfo(deadLocks);
+            dump.append(String.format("%n"));
+            dump.append("Deadlock is detected!");
+            dump.append(String.format("%n"));
+            for (ThreadInfo threadInfo : deadlockedThreads)
+            {
+                dump.append(threadInfo);
+            }
+        }
+        return dump.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/etc/bin/fail.py
----------------------------------------------------------------------
diff --git a/systests/etc/bin/fail.py b/systests/etc/bin/fail.py
deleted file mode 100644
index 517f31d..0000000
--- a/systests/etc/bin/fail.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-#
-#
-# 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.
-
-import os
-import re
-import datetime
-
-from optparse import OptionParser
-
-BASE_CMD = "mvn -Dskip.python.test=true %s test"
-
-def main():
-    parser = OptionParser()
-    parser.add_option("-t", "--test", dest="test",
-                      action="store", type="string",
-                      help="run specific tests")
-    parser.add_option("-c", "--continuous", dest="continuous",
-                      action="store_true", default=False,
-                      help="run tests after failures, don't stop")
-
-
-    (options, args) = parser.parse_args()
-
-    # determine command to run
-    if (options.test != None):
-        cmd = (BASE_CMD % ("-Dtest="+options.test))
-    else:
-        cmd = (BASE_CMD % (""))
-
-    run_forever = options.continuous
-
-
-    failed_runs = []
-    iteration = 0
-    fail_match = re.compile("BUILD SUCCESSFUL")
-    done = False
-
-    while (run_forever or not (len(failed_runs) > 0)):
-        iteration = iteration + 1
-        if (run_forever):
-            extra_text = (", %d failures so far: %s:" % (len(failed_runs), 
failed_runs))
-        else:
-            extra_text = ""
-        print ("%s Test run %d%s" % (datetime.datetime.today().isoformat(), 
iteration, extra_text))
-        (child_stdin, child_stdout_and_stderr) = os.popen4(cmd)
-        output = child_stdout_and_stderr.read()
-        child_stdin.close()
-        child_stdout_and_stderr.close()
-        matches = fail_match.search(output)
-        if (matches == None):
-            failed_runs.append(iteration)
-            output_name = ("test-run-%d.out" % (iteration))
-            #write testouput
-            test_output = file(output_name, "w")
-            test_output.write(output)
-            test_output.close()
-            #tar test-output and surefire reports together
-            find_stdout = os.popen("find . -type d -name surefire-reports")
-            surefire_dirs = find_stdout.read().replace('\n', ' ')
-            find_stdout.close()
-            tarcmd = ("tar -zcf test-failures-%d.tar.gz %s %s" % (iteration, 
output_name, surefire_dirs))
-            tar_stdout = os.popen(tarcmd)
-            tar_output = tar_stdout.read()
-            tar_exitstatus = tar_stdout.close()
-            print ("Something failed! Check %s" % (output_name))
-            if (tar_exitstatus != None):
-                print ("tar exited abornmally, aborting\n %s"  % (tar_output))
-                run_forever = False
-
-if __name__ == "__main__":
-    main()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/etc/config-systests.json
----------------------------------------------------------------------
diff --git a/systests/etc/config-systests.json 
b/systests/etc/config-systests.json
deleted file mode 100644
index c342413..0000000
--- a/systests/etc/config-systests.json
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *
- * 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.
- *
- */
-{
-  "name": "Broker",
-  "modelVersion": "7.0",
-  "authenticationproviders" : [ {
-    "name" : "plain",
-    "type" : "PlainPasswordFile",
-    "path" : "${qpid.home_dir}${file.separator}etc${file.separator}passwd"
-  } ],
-  "keystores" : [ {
-    "name" : "systestsKeyStore",
-    "storeUrl" : 
"${qpid.home_dir}${file.separator}..${file.separator}test-profiles${file.separator}test_resources${file.separator}ssl${file.separator}java_broker_keystore.jks",
-    "password" : "password"
-  } ],
-  "truststores" : [ {
-    "name" : "systestsTrustStore",
-    "storeUrl" : 
"${qpid.home_dir}${file.separator}..${file.separator}test-profiles${file.separator}test_resources${file.separator}ssl${file.separator}java_broker_truststore.jks",
-    "password" : "password"
-  } ],
-  "ports" : [  {
-    "name" : "amqp",
-    "authenticationProvider" : "plain",
-    "port" : "${test.port}",
-    "protocols" : "${test.amqp_port_protocols}",
-    "virtualhostaliases" : [ {
-        "name" : "nameAlias",
-        "type" : "nameAlias"
-    }, {
-        "name" : "defaultAlias",
-        "type" : "defaultAlias"
-    } ]
-  }, {
-    "name" : "http",
-    "authenticationProvider" : "plain",
-    "port" : "${test.hport}",
-    "protocols" : [ "HTTP" ]
-  }],
-  "virtualhostnodes" : [ {
-    "name" : "test",
-    "type" : "${virtualhostnode.type}",
-    "defaultVirtualHostNode" : "true",
-    "storePath" : 
"${qpid.work_dir}${file.separator}test${file.separator}config",
-    "context" : {
-      "virtualhostBlueprint" : "${virtualhostnode.context.blueprint}"
-    }
-  } ]
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/etc/groups-systests
----------------------------------------------------------------------
diff --git a/systests/etc/groups-systests b/systests/etc/groups-systests
deleted file mode 100644
index e3912ec..0000000
--- a/systests/etc/groups-systests
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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.
-#
-
-#
-# To define a group, use the format:
-#
-# <groupname>.users=<user1>,<user2>,...,<usern>
-#
-
-messaging-users.users=guest,client,server
-administrators.users=admin
-webadmins.users=webadmin
-

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/etc/log.properties
----------------------------------------------------------------------
diff --git a/systests/etc/log.properties b/systests/etc/log.properties
deleted file mode 100644
index ff36b7c..0000000
--- a/systests/etc/log.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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.
-#
-
-com.sleepycat.je.util.FileHandler.level=ALL
-com.sleepycat.je.util.ConsoleHandler.level=ALL

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/pom.xml
----------------------------------------------------------------------
diff --git a/systests/pom.xml b/systests/pom.xml
deleted file mode 100644
index 6e132d2..0000000
--- a/systests/pom.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.qpid</groupId>
-    <artifactId>qpid-systests-parent</artifactId>
-    <version>7.1.0-SNAPSHOT</version>
-    <relativePath>../qpid-systests-parent/pom.xml</relativePath>
-  </parent>
-
-  <artifactId>qpid-systests</artifactId>
-  <name>Apache Qpid Broker-J System Tests</name>
-  <description>System testing configuration, code and tests</description>
-
-  <dependencies>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-test-utils</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-systests-jms-core</artifactId>
-    </dependency>
-
-    <!-- broker deps -->
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-core</artifactId>
-      <classifier>tests</classifier>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-access-control</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-amqp-0-8-protocol</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-amqp-0-10-protocol</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-amqp-1-0-protocol</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-derby-store</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-jdbc-provider-bone</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-jdbc-store</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-logging-logback</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-management-http</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-broker-plugins-memory-store</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      
<artifactId>qpid-broker-plugins-amqp-1-0-protocol-jdbc-link-store</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      
<artifactId>qpid-broker-plugins-amqp-1-0-protocol-bdb-link-store</artifactId>
-      <optional>true</optional>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-bdbstore</artifactId>
-      <scope>test</scope>
-      <optional>true</optional>
-    </dependency>
-
-  </dependencies>
-
-  <build>
-    <resources>
-        <resource>
-            <directory>src/main/resources</directory>
-        </resource>
-    </resources>
-
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <configuration>
-          <excludes>
-            
<exclude>src/test/resources/org/apache/qpid/test/unit/message/**</exclude>
-            <exclude>qpid-systests-jms-core/**</exclude>
-            <exclude>qpid-systests-jms_1.1/**</exclude>
-            <exclude>qpid-systests-jms_2.0/**</exclude>
-            <exclude>protocol-tests-core/**</exclude>
-            <exclude>protocol-tests-amqp-1-0/**</exclude>
-            <exclude>protocol-tests-amqp-0-8/**</exclude>
-            <exclude>protocol-tests-amqp-0-10/**</exclude>
-            <exclude>systests-utils/**</exclude>
-            <exclude>end-to-end-conversion-tests/**</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-
-  <profiles>
-    <profile>
-      <id>addQpidJmsClientIfNecessary</id>
-      <activation>
-        <property>
-          <name>!enableAmqp0-x</name>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>org.apache.qpid</groupId>
-          <artifactId>qpid-jms-client</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-    <profile>
-      <!-- The 0-x client does not have a dependency on the JMS 1.1 spec.  Add 
it now. -->
-      <id>addJms11IfNecessary</id>
-      <activation>
-        <property>
-          <name>enableAmqp0-x</name>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>org.apache.qpid</groupId>
-          <artifactId>qpid-client</artifactId>
-        </dependency>
-        <dependency>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-jms_1.1_spec</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-</project>

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java
----------------------------------------------------------------------
diff --git a/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java 
b/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java
deleted file mode 100644
index be0dd54..0000000
--- a/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.systest.rest;
-
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class Asserts
-{
-    public static final String STATISTICS_ATTRIBUTE = "statistics";
-
-
-    public static void assertActualAndDesiredState(final String 
expectedDesiredState,
-                                             final String expectedActualState,
-                                             final Map<String, Object> data)
-    {
-        String name = (String) data.get(ConfiguredObject.NAME);
-        TestCase.assertEquals("Object with name " + name + " has unexpected 
desired state",
-                              expectedDesiredState,
-                              data.get(ConfiguredObject.DESIRED_STATE));
-        TestCase.assertEquals("Object with name " + name + " has unexpected 
actual state",
-                              expectedActualState, 
data.get(ConfiguredObject.STATE));
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/systest/rest/QpidRestTestCase.java
----------------------------------------------------------------------
diff --git 
a/systests/src/main/java/org/apache/qpid/systest/rest/QpidRestTestCase.java 
b/systests/src/main/java/org/apache/qpid/systest/rest/QpidRestTestCase.java
deleted file mode 100644
index 06f1b4c..0000000
--- a/systests/src/main/java/org/apache/qpid/systest/rest/QpidRestTestCase.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.systest.rest;
-
-import org.apache.qpid.server.model.VirtualHostNode;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-import org.apache.qpid.test.utils.TestBrokerConfiguration;
-
-public class QpidRestTestCase extends QpidBrokerTestCase
-{
-    public static final String EXTERNAL_AUTHENTICATION_PROVIDER = 
"testExternal";
-
-    public static final String TEST1_VIRTUALHOST = "test";
-    public static final String TEST2_VIRTUALHOST = "test2";
-    public static final String TEST3_VIRTUALHOST = "test3";
-
-    public static final String[] EXPECTED_VIRTUALHOSTS = { TEST1_VIRTUALHOST, 
TEST2_VIRTUALHOST, TEST3_VIRTUALHOST};
-    public static final String[] EXPECTED_EXCHANGES = { "amq.fanout", 
"amq.match", "amq.direct","amq.topic" };
-
-    protected RestTestHelper _restTestHelper;
-
-    @Override
-    public void setUp() throws Exception
-    {
-        // remove the normal 'test' vhost, we will configure the vhosts below
-        
getDefaultBrokerConfiguration().removeObjectConfiguration(VirtualHostNode.class,
 TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST);
-
-        // Set up virtualhost config with queues and bindings to the amq.direct
-        for (String virtualhost : EXPECTED_VIRTUALHOSTS)
-        {
-            createTestVirtualHostNode(virtualhost);
-        }
-
-        customizeConfiguration();
-        super.setUp();
-    }
-
-    @Override
-    public void startDefaultBroker() throws Exception
-    {
-        super.startDefaultBroker();
-        _restTestHelper = new RestTestHelper(getDefaultBroker().getHttpPort());
-    }
-
-    @Override
-    protected void tearDown() throws Exception
-    {
-        try
-        {
-            super.tearDown();
-        }
-        finally
-        {
-            getRestTestHelper().tearDown();
-        }
-    }
-
-    protected void customizeConfiguration() throws Exception
-    {
-        getDefaultBrokerConfiguration().addHttpManagementConfiguration();
-    }
-
-    public RestTestHelper getRestTestHelper()
-    {
-        return _restTestHelper;
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java
----------------------------------------------------------------------
diff --git 
a/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java 
b/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java
deleted file mode 100644
index 368f116..0000000
--- a/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.qpid.systest.rest;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Predicate;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.bind.DatatypeConverter;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Assert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.qpid.server.model.Queue;
-import org.apache.qpid.server.model.SystemConfig;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-import org.apache.qpid.test.utils.TestBrokerConfiguration;
-
-public class RestTestHelper
-{
-
-    private static final TypeReference<List<LinkedHashMap<String, Object>>> 
TYPE_LIST_OF_LINKED_HASH_MAPS = new TypeReference<List<LinkedHashMap<String, 
Object>>>()
-    {
-    };
-    private static final TypeReference<LinkedHashMap<String, Object>> 
TYPE_LINKED_HASH_MAPS = new TypeReference<LinkedHashMap<String, Object>>()
-    {
-    };
-    public static final String API_BASE = "/api/latest/";
-
-    private static final Logger LOGGER = 
LoggerFactory.getLogger(RestTestHelper.class);
-    public static final String DEFAULT_USERNAME = "webadmin";
-    public static final String DEFAULT_PASSWORD = "webadmin";
-
-    private int _httpPort;
-
-    private boolean _useSsl;
-
-
-    private String _username;
-
-    private String _password;
-
-    private boolean _useSslAuth;
-    static final String[] EXPECTED_QUEUES = { "queue", "ping" };
-    private final int _connectTimeout = 
Integer.getInteger("qpid.resttest_connection_timeout", 30000);
-
-    private String _truststore;
-    private String _truststorePassword;
-
-    private String _keystore;
-    private String _keystorePassword;
-
-    private String _clientAuthAlias;
-    private String _acceptEncoding;
-
-    public RestTestHelper(int httpPort)
-    {
-        _httpPort = httpPort;
-        setUsernameAndPassword(DEFAULT_USERNAME, DEFAULT_PASSWORD);
-    }
-
-    public int getHttpPort()
-    {
-        return _httpPort;
-    }
-
-    private String getHostName()
-    {
-        return "localhost";
-    }
-
-    private String getProtocol()
-    {
-        return _useSsl ? "https" : "http";
-    }
-
-    public String getManagementURL()
-    {
-        return getProtocol() + "://" + getHostName() + ":" + getHttpPort();
-    }
-
-    public URL getManagementURL(String path) throws MalformedURLException
-    {
-        return new URL(getManagementURL() + path);
-    }
-
-    public void setKeystore(final String keystore, final String 
keystorePassword)
-    {
-        _keystore = keystore;
-        _keystorePassword = keystorePassword;
-    }
-
-    public void setTruststore(final String truststore, final String 
truststorePassword)
-    {
-        _truststore = truststore;
-        _truststorePassword = truststorePassword;
-    }
-
-    public void setClientAuthAlias(final String clientAuthAlias)
-    {
-        _clientAuthAlias = clientAuthAlias;
-    }
-
-    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();
-        httpCon.setConnectTimeout(_connectTimeout);
-
-        if(_username != null)
-        {
-            String encoded = DatatypeConverter.printBase64Binary((_username + 
":" + _password).getBytes(UTF_8));
-            httpCon.setRequestProperty("Authorization", "Basic " + encoded);
-        }
-
-        if (_acceptEncoding != null && !"".equals(_acceptEncoding))
-        {
-            httpCon.setRequestProperty("Accept-Encoding", _acceptEncoding);
-        }
-
-        httpCon.setDoOutput(true);
-        httpCon.setRequestMethod(method);
-        return httpCon;
-    }
-
-    public List<Map<String, Object>> readJsonResponseAsList(HttpURLConnection 
connection) throws IOException
-    {
-        byte[] data = readConnectionInputStream(connection);
-        ObjectMapper mapper = new ObjectMapper();
-        List<Map<String, Object>> providedObject = mapper.readValue(new 
ByteArrayInputStream(data), TYPE_LIST_OF_LINKED_HASH_MAPS);
-        return providedObject;
-    }
-
-    public Map<String, Object> readJsonResponseAsMap(HttpURLConnection 
connection) throws IOException
-    {
-        byte[] data = readConnectionInputStream(connection);
-
-        ObjectMapper mapper = new ObjectMapper();
-        Map<String, Object> providedObject = mapper.readValue(new 
ByteArrayInputStream(data), TYPE_LINKED_HASH_MAPS);
-        return providedObject;
-    }
-
-    public <T> T readJsonResponse(HttpURLConnection connection, Class<T> 
valueType) throws IOException
-    {
-        byte[] data = readConnectionInputStream(connection);
-
-        ObjectMapper mapper = new ObjectMapper();
-
-        return mapper.readValue(new ByteArrayInputStream(data), valueType);
-    }
-
-    private byte[] readConnectionInputStream(HttpURLConnection connection) 
throws IOException
-    {
-        InputStream is = connection.getInputStream();
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        byte[] buffer = new byte[1024];
-        int len = -1;
-        while ((len = is.read(buffer)) != -1)
-        {
-            baos.write(buffer, 0, len);
-        }
-        if (LOGGER.isTraceEnabled())
-        {
-            LOGGER.trace("RESPONSE:" + new String(baos.toByteArray(), UTF_8));
-        }
-        return baos.toByteArray();
-    }
-
-    private void writeJsonRequest(HttpURLConnection connection, Object data) 
throws IOException
-    {
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.writeValue(connection.getOutputStream(), data);
-    }
-
-    public Map<String, Object> find(String name, Object value, 
List<Map<String, Object>> data)
-    {
-        if (data == null)
-        {
-            return null;
-        }
-
-        for (Map<String, Object> map : data)
-        {
-            Object mapValue = map.get(name);
-            if (value.equals(mapValue))
-            {
-                return map;
-            }
-        }
-        return null;
-    }
-
-    public Map<String, Object> find(Map<String, Object> searchAttributes, 
List<Map<String, Object>> data)
-    {
-        for (Map<String, Object> map : data)
-        {
-            boolean equals = true;
-            for (Map.Entry<String, Object> entry : searchAttributes.entrySet())
-            {
-                Object mapValue = map.get(entry.getKey());
-                if (!entry.getValue().equals(mapValue))
-                {
-                    equals = false;
-                    break;
-                }
-            }
-            if (equals)
-            {
-                return map;
-            }
-        }
-        return null;
-    }
-
-    public Map<String, Object> getJsonAsSingletonList(String path) throws 
IOException
-    {
-        List<Map<String, Object>> response = getJsonAsList(path);
-
-        Assert.assertNotNull("Response cannot be null", response);
-        Assert.assertEquals("Unexpected response from " + path, 1, 
response.size());
-        return response.get(0);
-    }
-
-    public Map<String, Object> postDataToPathAndGetObject(String path, 
Map<String, Object> data) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(path, "POST");
-        connection.connect();
-        writeJsonRequest(connection, data);
-        Map<String, Object> response = readJsonResponseAsMap(connection);
-        return response;
-    }
-
-    public List<Map<String, Object>> getJsonAsList(String path) throws 
IOException
-    {
-        HttpURLConnection connection = openManagementConnection(path, "GET");
-        connection.connect();
-        List<Map<String, Object>> response = 
readJsonResponseAsList(connection);
-        return response;
-    }
-
-    public List<Object> getJsonAsSimpleList(String path) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(path, "GET");
-        connection.connect();
-        byte[] data = readConnectionInputStream(connection);
-        ObjectMapper mapper = new ObjectMapper();
-        List<Object> providedObject = mapper.readValue(new 
ByteArrayInputStream(data), new TypeReference<List<Object>>()
-        {
-        });
-        return providedObject;
-    }
-
-    public Map<String, Object> getJsonAsMap(String path) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(path, "GET");
-        connection.connect();
-        Map<String, Object> response = readJsonResponseAsMap(connection);
-        return response;
-    }
-
-    public <T> T getJson(String path, final Class<T> valueType) throws 
IOException
-    {
-        HttpURLConnection connection = openManagementConnection(path, "GET");
-        connection.connect();
-        return readJsonResponse(connection, valueType);
-    }
-
-    public <T> T postJson(String path, final Object data , final Class<T> 
valueType) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(path, "POST");
-        connection.connect();
-        writeJsonRequest(connection, data);
-        return readJsonResponse(connection, valueType);
-    }
-
-    public void createNewGroupMember(String groupProviderName, String 
groupName, String memberName, int responseCode) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(
-                "groupmember/" + encodeAsUTF(groupProviderName) + "/"+ 
encodeAsUTF(groupName) + "/" +  encodeAsUTF(memberName),
-                "PUT");
-
-        Map<String, Object> groupMemberData = new HashMap<String, Object>();
-        // TODO add type
-        writeJsonRequest(connection, groupMemberData);
-
-        Assert.assertEquals("Unexpected response code", responseCode, 
connection.getResponseCode());
-
-        connection.disconnect();
-    }
-
-    public void createNewGroupMember(String groupProviderName, String 
groupName, String memberName) throws IOException
-    {
-        createNewGroupMember(groupProviderName, groupName, memberName, 
HttpServletResponse.SC_CREATED);
-    }
-
-    public void removeMemberFromGroup(String groupProviderName, String 
groupName, String memberName, int responseCode) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(
-                "groupmember/" + encodeAsUTF(groupProviderName) + "/"+ 
encodeAsUTF(groupName) + "/" +  encodeAsUTF(memberName),
-                "DELETE");
-
-        Assert.assertEquals("Unexpected response code", responseCode, 
connection.getResponseCode());
-
-        connection.disconnect();
-    }
-
-    public void removeMemberFromGroup(String groupProviderName, String 
groupName, String memberName) throws IOException
-    {
-        removeMemberFromGroup(groupProviderName, groupName, memberName, 
HttpServletResponse.SC_OK);
-    }
-
-    public void assertNumberOfGroupMembers(Map<String, Object> data, int 
expectedNumberOfGroupMembers)
-    {
-        @SuppressWarnings("unchecked")
-        List<Map<String, Object>> groups = (List<Map<String, Object>>) 
data.get("groupmembers");
-        if (groups == null)
-        {
-            groups = Collections.emptyList();
-        }
-
-        Assert.assertEquals("Unexpected number of group members", 
expectedNumberOfGroupMembers, groups.size());
-    }
-
-    public void createGroup(String groupName, String groupProviderName) throws 
IOException
-    {
-        createGroup(groupName, groupProviderName, 
HttpServletResponse.SC_CREATED);
-    }
-
-    public void createGroup(String groupName, String groupProviderName, int 
responseCode) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(
-                "group/" + encodeAsUTF(groupProviderName) + "/"+ 
encodeAsUTF(groupName),
-                "PUT");
-
-        Map<String, Object> groupData = new HashMap<String, Object>();
-        writeJsonRequest(connection, groupData);
-
-        Assert.assertEquals("Unexpected response code", responseCode, 
connection.getResponseCode());
-
-        connection.disconnect();
-    }
-
-    public void createOrUpdateUser(String username, String password) throws 
IOException
-    {
-        createOrUpdateUser(username, password, HttpServletResponse.SC_CREATED);
-    }
-
-    public void createOrUpdateUser(String username, String password, int 
responseCode) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection("user/"
-                + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + 
"/" + username, "PUT");
-
-        Map<String, Object> data = new HashMap<String, Object>();
-        data.put("password", password);
-        writeJsonRequest(connection, data);
-
-        Assert.assertEquals("Unexpected response code", responseCode, 
connection.getResponseCode());
-
-        connection.disconnect();
-    }
-
-    public void removeGroup(String groupName, String groupProviderName, int 
responseCode) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(
-                "group/" + encodeAsUTF(groupProviderName) + "/"+ 
encodeAsUTF(groupName),
-                "DELETE");
-
-        Assert.assertEquals("Unexpected response code", responseCode, 
connection.getResponseCode());
-        connection.disconnect();
-    }
-
-    public void removeGroup(String groupName, String groupProviderName) throws 
IOException
-    {
-        removeGroup(groupName, groupProviderName, HttpServletResponse.SC_OK);
-    }
-
-    public void removeUserById(String id) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection("user/"
-                + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + 
"?id=" + id, "DELETE");
-        Assert.assertEquals("Unexpected response code", 
HttpServletResponse.SC_OK, connection.getResponseCode());
-        connection.disconnect();
-    }
-
-    public void removeUser(String username, int responseCode) throws 
IOException
-    {
-        HttpURLConnection connection = openManagementConnection("user/"
-                + TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER + 
"/" + username, "DELETE");
-        Assert.assertEquals("Unexpected response code", responseCode, 
connection.getResponseCode());
-        connection.disconnect();
-    }
-
-    public void removeUser(String username) throws IOException
-    {
-        removeUser(username, HttpServletResponse.SC_OK);
-    }
-
-    public void assertNumberOfGroups(Map<String, Object> data, int 
expectedNumberOfGroups)
-    {
-        @SuppressWarnings("unchecked")
-        List<Map<String, Object>> groups = (List<Map<String, Object>>) 
data.get("groups");
-        if (groups == null)
-        {
-            groups = Collections.emptyList();
-        }
-        Assert.assertEquals("Unexpected number of groups", 
expectedNumberOfGroups, groups.size());
-    }
-
-    public void setUsernameAndPassword(String username, String password)
-    {
-        _username = username;
-        _password = password;
-    }
-
-    public void setManagementModeCredentials()
-    {
-        setUsernameAndPassword(SystemConfig.MANAGEMENT_MODE_USER_NAME, 
QpidBrokerTestCase.MANAGEMENT_MODE_PASSWORD);
-    }
-
-    public void tearDown()
-    {
-
-    }
-
-
-    public int submitRequest(String url, String method, Object data) throws 
IOException
-    {
-        return submitRequest(url, method, data, null);
-    }
-
-    public int submitRequest(String url, String method, Object data, 
Map<String, List<String>> responseHeadersToCapture) throws IOException
-    {
-        HttpURLConnection connection = openManagementConnection(url, method);
-        if (data != null)
-        {
-            writeJsonRequest(connection, data);
-        }
-        int responseCode = connection.getResponseCode();
-        if (responseHeadersToCapture!= null)
-        {
-            responseHeadersToCapture.putAll(connection.getHeaderFields());
-        }
-        connection.disconnect();
-        return responseCode;
-    }
-
-    public int submitRequest(String url, String method) throws IOException
-    {
-        return submitRequest(url, method, (byte[])null);
-    }
-
-    public void submitRequest(String url, String method, Object data, int 
expectedResponseCode) throws IOException
-    {
-        Map<String, List<String>> headers = new HashMap<>();
-        int responseCode = submitRequest(url, method, data, headers);
-        Assert.assertEquals("Unexpected response code from " + method + " " + 
url , expectedResponseCode, responseCode);
-        if (expectedResponseCode == 201)
-        {
-            List<String> location = headers.get("Location");
-            Assert.assertTrue("Location is not returned by REST create 
request", location != null && location.size() == 1);
-        }
-    }
-
-    public void submitRequest(String url, String method, int 
expectedResponseCode) throws IOException
-    {
-        submitRequest(url, method, null, expectedResponseCode);
-    }
-
-    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");
-        connection.connect();
-        return readConnectionInputStream(connection);
-    }
-
-    public void setUseSslAuth(final boolean useSslAuth)
-    {
-        _useSslAuth = useSslAuth;
-        _useSsl = true;
-    }
-
-    public void createTestQueues() throws IOException
-    {
-        for (int i = 0; i < EXPECTED_QUEUES.length; i++)
-        {
-            String queueName = EXPECTED_QUEUES[i];
-            Map<String, Object> queueData = new HashMap<>();
-            queueData.put(Queue.NAME, queueName);
-            queueData.put(Queue.DURABLE, Boolean.FALSE);
-            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<>();
-            bindingData.put("bindingKey", queueName);
-            bindingData.put("destination", queueName);
-            responseCode = submitRequest("exchange/test/test/amq.direct/bind", 
"POST", bindingData);
-            Assert.assertEquals("Unexpected response code binding queue " + 
queueName, 200, responseCode);
-        }
-    }
-
-    public String encode(String value, String encoding) throws 
UnsupportedEncodingException
-    {
-        return URLEncoder.encode(value, encoding).replace("+", "%20");
-    }
-
-    public String encodeAsUTF(String value)
-    {
-        try
-        {
-            return encode(value, "UTF8");
-        }
-        catch(UnsupportedEncodingException e)
-        {
-            throw new RuntimeException("Unsupported encoding UTF8", e);
-        }
-    }
-
-    public Map<String, Object> waitForAttributeChanged(String url,
-                                                       String attributeName,
-                                                       Object newValue) throws 
Exception
-    {
-        return waitForAttributeChanged(url, (attr -> 
newValue.equals(attr.get(attributeName))));
-
-    }
-
-    public Map<String, Object> waitForAttributeChanged(String url,
-                                                       Predicate<Map<String, 
Object>> attributePredicate) throws Exception
-    {
-        Map<String, Object> nodeAttributes = 
getAttributesIgnoringNotFound(url);
-        int timeout = 30000;
-        long limit = System.currentTimeMillis() + timeout;
-        while(System.currentTimeMillis() < limit && (nodeAttributes == null || 
!attributePredicate.test(nodeAttributes)))
-        {
-            Thread.sleep(100L);
-            nodeAttributes = getAttributesIgnoringNotFound(url);
-        }
-        Assert.assertTrue(String.format("Attributes predicate not satisfied 
after %d ms.  Last attribute state state : %s",
-                                          timeout,
-                                          nodeAttributes), 
attributePredicate.test(nodeAttributes));
-        return nodeAttributes;
-    }
-
-    private Map<String, Object> getAttributesIgnoringNotFound(String url) 
throws IOException
-    {
-        Map<String, Object> nodeAttributes;
-        try
-        {
-            nodeAttributes = getJsonAsMap(url);
-        }
-        catch(FileNotFoundException e)
-        {
-            nodeAttributes = null;
-        }
-        return nodeAttributes;
-    }
-
-    public String getAcceptEncoding()
-    {
-        return _acceptEncoding;
-    }
-
-    public void setAcceptEncoding(String acceptEncoding)
-    {
-        _acceptEncoding = acceptEncoding;
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java
----------------------------------------------------------------------
diff --git 
a/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java 
b/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java
deleted file mode 100644
index 4c447f7..0000000
--- 
a/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.qpid.test.utils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.qpid.server.util.FileUtils;
-
-public abstract class AbstractBrokerHolder implements BrokerHolder
-{
-    private static final String RELATIVE_BROKER_CONFIG_PATH = "config.json";
-    private static final AtomicInteger BROKER_INDEX = new AtomicInteger();
-    private static final Logger LOGGER = 
LoggerFactory.getLogger(AbstractBrokerHolder.class);
-
-    private final String _classQualifiedTestName;
-    private final File _logFile;
-    private final String _brokerStoreType;
-    private final String _configurationPath;
-    private final int _brokerIndex;
-    private final String _amqpTcpPortRegExp;
-    private final String _initialConfigurationPath;
-    private final String _httpTcpPortRegExp;
-    private final String _amqpTlsPortRegExp;
-    private final String _httpTlsPortRegExp;
-    private final Path _qpidWorkDir;
-
-    private TestBrokerConfiguration _configuration;
-    private int _amqpPort;
-    private int _httpPort;
-    private int _amqpTlsPort;
-    private int _httpsPort;
-    private boolean _waitForPorts;
-
-    public AbstractBrokerHolder(int port, String classQualifiedTestName, File 
logFile)
-    {
-        _amqpPort = port;
-        _brokerIndex = BROKER_INDEX.getAndIncrement();
-        _classQualifiedTestName = classQualifiedTestName;
-        _logFile = logFile;
-        _initialConfigurationPath = System.getProperty("broker.config");
-        _brokerStoreType = System.getProperty("broker.config-store-type", 
"JSON");
-        _amqpTcpPortRegExp =
-                System.getProperty("broker.amqpTcpPortRegEx", "BRK-1002 : 
Starting : Listening on TCP port (\\d+)");
-        _httpTcpPortRegExp = System.getProperty("broker.httpTcpPortRegEx",
-                                                "MNG-1002 : Starting : HTTP : 
Listening on TCP port (\\d+)");
-        _amqpTlsPortRegExp =
-                System.getProperty("broker.amqpTlsPortRegEx", "BRK-1002 : 
Starting : Listening on SSL port (\\d+)");
-        _httpTlsPortRegExp = System.getProperty("broker.httpTlsPortRegEx",
-                                                "MNG-1002 : Starting : HTTP : 
Listening on SSL port (\\d+)");
-        _waitForPorts = !Boolean.getBoolean("qpid.test_nowait_for_ports");
-
-        try
-        {
-            _qpidWorkDir = Files.createTempDirectory("qpid-work-" + 
_classQualifiedTestName + "-" + _brokerIndex + "-");
-            _configurationPath = 
_qpidWorkDir.toAbsolutePath().resolve(RELATIVE_BROKER_CONFIG_PATH).toString();
-        }
-        catch (IOException e)
-        {
-            throw new RuntimeException("Cannot create work directory", e);
-        }
-    }
-
-    @Override
-    public Path getWorkDir()
-    {
-        return _qpidWorkDir;
-    }
-
-    @Override
-    public String getConfigurationPath()
-    {
-        return _configurationPath;
-    }
-
-    @Override
-    public int getBrokerIndex()
-    {
-        return _brokerIndex;
-    }
-
-    @Override
-    public int getAmqpPort()
-    {
-        return _amqpPort;
-    }
-
-    @Override
-    public int getHttpPort()
-    {
-        return _httpPort;
-    }
-
-    @Override
-    public int getHttpsPort()
-    {
-        return _httpsPort;
-    }
-
-    @Override
-    public int getAmqpTlsPort()
-    {
-        return _amqpTlsPort;
-    }
-
-    @Override
-    public void cleanUp()
-    {
-        getConfiguration().cleanUp();
-        FileUtils.delete(getWorkDir().toFile(), true);
-    }
-
-    @Override
-    public TestBrokerConfiguration getConfiguration()
-    {
-        if (_configuration == null)
-        {
-            _configuration = createBrokerConfiguration();
-        }
-        return _configuration;
-    }
-
-    @Override
-    public void restart() throws Exception
-    {
-        shutdown();
-        start();
-    }
-
-    @Override
-    public void start() throws Exception
-    {
-        start(false);
-    }
-
-    @Override
-    public void start(boolean managementMode) throws Exception
-    {
-        saveConfiguration(getConfiguration());
-        start(managementMode, _amqpPort);
-        if (_amqpPort <= 0)
-        {
-            _amqpPort = scrapePortFromLog(_logFile, _amqpTcpPortRegExp);
-        }
-        if (_amqpTlsPort <= 0)
-        {
-            _amqpTlsPort = scrapePortFromLog(_logFile, _amqpTlsPortRegExp);
-        }
-        if (_httpPort <= 0)
-        {
-            _httpPort = scrapePortFromLog(_logFile, _httpTcpPortRegExp);
-        }
-        if (_httpsPort <= 0)
-        {
-            _httpsPort = scrapePortFromLog(_logFile, _httpTlsPortRegExp);
-        }
-    }
-
-    @Override
-    public void createVirtualHostNode(final String virtualHostNodeName,
-                                      final String storeType,
-                                      final String storeDir,
-                                      final String blueprint)
-    {
-        getConfiguration().createVirtualHostNode(virtualHostNodeName, 
storeType, storeDir, blueprint);
-    }
-
-    protected TestBrokerConfiguration createBrokerConfiguration()
-    {
-        return new TestBrokerConfiguration(_brokerStoreType, new 
File(_initialConfigurationPath).getAbsolutePath());
-    }
-
-    protected String getClassQualifiedTestName()
-    {
-        return _classQualifiedTestName;
-    }
-
-    void waitUntilPortsAreFreeIfRequired()
-    {
-        if (_waitForPorts)
-        {
-            Set<Integer> ports = new HashSet<>();
-            ports.add(getAmqpPort());
-            ports.add(getAmqpTlsPort());
-            ports.add(getHttpPort());
-            ports.add(getHttpsPort());
-            new PortHelper().waitUntilPortsAreFree(ports);
-        }
-    }
-
-    abstract protected String getLogPrefix();
-
-
-    protected abstract void start(final boolean managementMode, final int 
amqpPort) throws Exception;
-
-    private void saveConfiguration(TestBrokerConfiguration testConfiguration)
-    {
-        if (testConfiguration != null && !testConfiguration.isSaved())
-        {
-            LOGGER.info("Saving test broker configuration at: " + 
_configurationPath);
-            testConfiguration.save(new File(_configurationPath));
-            testConfiguration.setSaved(true);
-        }
-    }
-
-    private int scrapePortFromLog(final File logFile, final String portRegEx) 
throws IOException
-    {
-        final String logPrefix = getLogPrefix();
-        Pattern portPattern = Pattern.compile(portRegEx);
-        try (BufferedReader br = new BufferedReader(new FileReader(logFile)))
-        {
-            String line = null;
-            while ((line = br.readLine()) != null)
-            {
-                if (logPrefix == null || line.contains(logPrefix))
-                {
-                    Matcher matcher = portPattern.matcher(line);
-                    if (matcher.find() && matcher.groupCount() > 0)
-                    {
-                        return Integer.valueOf(matcher.group(1)).intValue();
-                    }
-                }
-            }
-        }
-        return 0;
-    }
-
-    String getBrokerStoreType()
-    {
-        return _brokerStoreType;
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/test/utils/BrokerCommandHelper.java
----------------------------------------------------------------------
diff --git 
a/systests/src/main/java/org/apache/qpid/test/utils/BrokerCommandHelper.java 
b/systests/src/main/java/org/apache/qpid/test/utils/BrokerCommandHelper.java
deleted file mode 100644
index f381702..0000000
--- a/systests/src/main/java/org/apache/qpid/test/utils/BrokerCommandHelper.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.qpid.test.utils;
-
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Generates the command to start a broker by substituting the tokens
- * in the provided broker command.
- *
- * The command is returned as a list so that it can be easily used by a
- * {@link java.lang.ProcessBuilder}.
- */
-public class BrokerCommandHelper
-{
-    private final List<String> _brokerCommandTemplateAsList;
-
-    public BrokerCommandHelper(String brokerCommandTemplate)
-    {
-        _brokerCommandTemplateAsList = split(brokerCommandTemplate);
-    }
-
-    public String[] getBrokerCommand(int port, String qpidWork, String 
storePath, String storeType)
-    {
-        String[] command = new String[_brokerCommandTemplateAsList.size()];
-        int i=0;
-        for (String commandPart : _brokerCommandTemplateAsList)
-        {
-            command[i] = commandPart
-                    .replace("@PORT", "" + port)
-                    .replace("@QPID_WORK", qpidWork)
-                    .replace("@STORE_PATH", storePath)
-                    .replace("@STORE_TYPE", storeType);
-            i++;
-        }
-        return command;
-    }
-
-    private static List<String> split(String str)
-    {
-        List<String> tokens = new LinkedList<String>();
-        boolean inQuote = false;
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < str.length(); i++)
-        {
-            char c = str.charAt(i);
-
-            if (c == '\"' || c == '\'')
-            {
-                inQuote = !inQuote;
-            }
-            else if (c == ' ' && !inQuote)
-            {
-                if (sb.length() > 0)
-                {
-                    tokens.add(sb.toString());
-                    sb.delete(0, sb.length());
-                }
-            }
-            else
-            {
-                sb.append(c);
-            }
-        }
-        if (sb.length() > 0)
-        {
-            tokens.add(sb.toString());
-        }
-        return tokens;
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/test/utils/BrokerHolder.java
----------------------------------------------------------------------
diff --git 
a/systests/src/main/java/org/apache/qpid/test/utils/BrokerHolder.java 
b/systests/src/main/java/org/apache/qpid/test/utils/BrokerHolder.java
deleted file mode 100644
index 9373c4c..0000000
--- a/systests/src/main/java/org/apache/qpid/test/utils/BrokerHolder.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.utils;
-
-import java.nio.file.Path;
-
-public interface BrokerHolder
-{
-    void start() throws Exception;
-    void start(boolean managementMode) throws Exception;
-    void restart() throws Exception;
-    void shutdown();
-    void kill();
-    void cleanUp();
-    String dumpThreads();
-    void createVirtualHostNode(String virtualHostNodeName, String storeType, 
String storeDir, String blueprint);
-    TestBrokerConfiguration getConfiguration();
-    String getConfigurationPath();
-    Path getWorkDir();
-    int getBrokerIndex();
-    int getAmqpPort();
-    int getHttpPort();
-    int getHttpsPort();
-    int getAmqpTlsPort();
-
-    enum BrokerType
-    {
-        EXTERNAL /** Test case relies on a Broker started independently of the 
test-suite */,
-        INTERNAL /** Test case starts an embedded broker within this JVM */,
-        SPAWNED /** Test case spawns a new broker as a separate process */
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/test/utils/InternalBrokerHolder.java
----------------------------------------------------------------------
diff --git 
a/systests/src/main/java/org/apache/qpid/test/utils/InternalBrokerHolder.java 
b/systests/src/main/java/org/apache/qpid/test/utils/InternalBrokerHolder.java
deleted file mode 100644
index c73ba61..0000000
--- 
a/systests/src/main/java/org/apache/qpid/test/utils/InternalBrokerHolder.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.utils;
-
-import java.io.File;
-import java.security.PrivilegedAction;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.security.auth.Subject;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.qpid.server.SystemLauncher;
-import org.apache.qpid.server.SystemLauncherListener;
-import 
org.apache.qpid.server.logging.logback.LogbackLoggingSystemLauncherListener;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.IllegalStateTransitionException;
-import org.apache.qpid.server.model.SystemConfig;
-import org.apache.qpid.server.security.auth.TaskPrincipal;
-
-public class InternalBrokerHolder extends AbstractBrokerHolder
-{
-    private final static Logger LOGGER = 
LoggerFactory.getLogger(InternalBrokerHolder.class);
-    private final static UncaughtExceptionHandler UNCAUGHT_EXCEPTION_HANDLER = 
new UncaughtExceptionHandler();
-
-    private volatile SystemLauncher _systemLauncher;
-
-    public InternalBrokerHolder(int port, final String classQualifiedTestName, 
final File logFile)
-    {
-        super(port, classQualifiedTestName, logFile);
-    }
-
-
-    @Override
-    protected void start(final boolean managementMode, final int amqpPort) 
throws Exception
-    {
-
-        Map<String,String> context = new HashMap<>();
-        context.put("test.hport", String.valueOf(getHttpPort()));
-        context.put("qpid.home_dir", System.getProperty("QPID_HOME"));
-        context.put("qpid.work_dir", getWorkDir().toString());
-
-        context.put("test.port", String.valueOf(amqpPort));
-
-        Map<String,Object> attributes = new HashMap<>();
-
-        attributes.put(ConfiguredObject.CONTEXT, context);
-        attributes.put(ConfiguredObject.TYPE, getBrokerStoreType());
-        attributes.put("storePath", getConfigurationPath());
-
-        attributes.put(SystemConfig.MANAGEMENT_MODE, managementMode);
-
-        if(managementMode)
-        {
-            attributes.put(SystemConfig.MANAGEMENT_MODE_PASSWORD, 
QpidBrokerTestCase.MANAGEMENT_MODE_PASSWORD);
-        }
-
-        start(attributes);
-
-    }
-
-    public void start(final Map<String,Object> systemConfig) throws Exception
-    {
-        if (Thread.getDefaultUncaughtExceptionHandler() == null)
-        {
-            
Thread.setDefaultUncaughtExceptionHandler(UNCAUGHT_EXCEPTION_HANDLER);
-        }
-
-        LOGGER.info("Starting internal broker (same JVM)");
-
-        _systemLauncher = new SystemLauncher(new 
LogbackLoggingSystemLauncherListener(),
-                                             new 
SystemLauncherListener.DefaultSystemLauncherListener()
-                                             {
-                                                 @Override
-                                                 public void onShutdown(final 
int exitCode)
-                                                 {
-                                                     _systemLauncher = null;
-                                                 }
-
-                                                 @Override
-                                                 public void 
exceptionOnShutdown(final Exception e)
-                                                 {
-                                                     if (e instanceof 
IllegalStateException
-                                                         || e instanceof 
IllegalStateTransitionException)
-                                                     {
-                                                         System.out.println(
-                                                                 
"IllegalStateException occurred on broker shutdown in test "
-                                                                 + 
getClassQualifiedTestName());
-                                                     }
-                                                 }
-                                             });
-
-        _systemLauncher.startup(systemConfig);
-    }
-
-    @Override
-    public void shutdown()
-    {
-        if (_systemLauncher != null)
-        {
-            LOGGER.info("Shutting down Broker instance");
-            Subject shutdownSubject = new Subject(true,
-                                                  new 
HashSet<>(Arrays.asList(_systemLauncher.getSystemPrincipal(), new 
TaskPrincipal("Shutdown"))),
-                                                  Collections.emptySet(),
-                                                  Collections.emptySet());
-            Subject.doAs(shutdownSubject, new PrivilegedAction<Object>()
-            {
-                @Override
-                public Object run()
-                {
-                    if (_systemLauncher != null)
-                    {
-                        _systemLauncher.shutdown();
-                    }
-                    return null;
-                }
-            });
-            waitUntilPortsAreFreeIfRequired();
-            LOGGER.info("Broker instance shutdown");
-        }
-        else
-        {
-            LOGGER.info("Nothing to shutdown. Broker instance either was 
already shut down or not started at all.");
-        }
-
-        if (UNCAUGHT_EXCEPTION_HANDLER.getAndResetCount() > 0)
-        {
-            throw new RuntimeException(
-                    "One or more uncaught exceptions occurred prior to end of 
this test. Check test logs.");
-        }
-    }
-
-    @Override
-    public void kill()
-    {
-        // Can't kill a internal broker as we would also kill ourselves as we 
share the same JVM.
-        shutdown();
-    }
-
-    @Override
-    public String dumpThreads()
-    {
-        return TestUtils.dumpThreads();
-    }
-
-    @Override
-    public String toString()
-    {
-        return "InternalBrokerHolder [amqpPort=" + getAmqpPort() + "]";
-    }
-
-    @Override
-    protected String getLogPrefix()
-    {
-        return null;
-    }
-
-    private static class UncaughtExceptionHandler implements 
Thread.UncaughtExceptionHandler
-    {
-        private final AtomicInteger _count = new AtomicInteger(0);
-
-        @Override
-        public void uncaughtException(final Thread t, final Throwable e)
-        {
-            System.err.print("Thread terminated due to uncaught exception");
-            e.printStackTrace();
-
-            LOGGER.error("Uncaught exception from thread {}", t.getName(), e);
-            _count.getAndIncrement();
-        }
-
-        public int getAndResetCount()
-        {
-            int count;
-            do
-            {
-                count = _count.get();
-            }
-            while (!_count.compareAndSet(count, 0));
-            return count;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java
----------------------------------------------------------------------
diff --git 
a/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java
 
b/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java
deleted file mode 100644
index 4b59d5e..0000000
--- 
a/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.test.utils;
-
-import ch.qos.logback.core.PropertyDefinerBase;
-
-public class LogbackSocketPortNumberDefiner extends PropertyDefinerBase
-{
-    /**
-     * Port number that will be bound by a Logback Socket Receiver.  This is 
assigned once per JVM instance.
-     */
-    private static final int LOGBACK_SOCKET_PORT_NUMBER = new 
PortHelper().getNextAvailable(Integer.getInteger("qpid.logback.receiver.port", 
15000));
-
-    public static int getLogbackSocketPortNumber()
-    {
-        return LOGBACK_SOCKET_PORT_NUMBER;
-    }
-
-    @Override
-    public String getPropertyValue()
-    {
-        return String.valueOf(LOGBACK_SOCKET_PORT_NUMBER);
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/768f4fb0/systests/src/main/java/org/apache/qpid/test/utils/Piper.java
----------------------------------------------------------------------
diff --git a/systests/src/main/java/org/apache/qpid/test/utils/Piper.java 
b/systests/src/main/java/org/apache/qpid/test/utils/Piper.java
deleted file mode 100644
index 5eb604d..0000000
--- a/systests/src/main/java/org/apache/qpid/test/utils/Piper.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.utils;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class Piper extends Thread
-{
-    private static final Logger LOGGER = LoggerFactory.getLogger(Piper.class);
-
-    private final BufferedReader _in;
-    private final Logger _out;
-    private final String _ready;
-    private final CountDownLatch _latch;
-    private final String _stopped;
-    private volatile boolean _seenReady;
-    private volatile String _stopLine;
-
-    public Piper(InputStream in, String ready, String stopped, String 
threadName, String loggerName)
-    {
-        super(threadName);
-        _in = new BufferedReader(new InputStreamReader(in));
-        _out = LoggerFactory.getLogger(loggerName);
-        _ready = ready;
-        _stopped = stopped;
-        _seenReady = false;
-
-        if (this._ready != null && !this._ready.equals(""))
-        {
-            this._latch = new CountDownLatch(1);
-        }
-        else
-        {
-            this._latch = null;
-        }
-    }
-
-    public boolean await(long timeout, TimeUnit unit) throws 
InterruptedException
-    {
-        if (_latch == null)
-        {
-            return true;
-        }
-        else
-        {
-            _latch.await(timeout, unit);
-            return _seenReady;
-        }
-    }
-
-    @Override
-    public void run()
-    {
-        try
-        {
-            String line;
-            while ((line = _in.readLine()) != null)
-            {
-                _out.info(line);
-
-                if (_latch != null && line.contains(_ready))
-                {
-                    _seenReady = true;
-                    _latch.countDown();
-                }
-
-                if (!_seenReady && line.contains(_stopped))
-                {
-                    _stopLine = line;
-                }
-            }
-        }
-        catch (IOException e)
-        {
-            LOGGER.warn(e.getMessage() + " : Broker stream from unexpectedly 
closed; last log lines written by Broker may be lost.");
-        }
-        finally
-        {
-            if (_latch != null)
-            {
-                _latch.countDown();
-            }
-        }
-    }
-
-    public String getStopLine()
-    {
-        return _stopLine;
-    }
-
-    String getReady()
-    {
-        return _ready;
-    }
-}


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

Reply via email to