qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r733073 [3/4] - in /qpid/trunk/qpid/java/management/tools/qpid-cli: src/org/apache/qpid/ src/org/apache/qpid/commands/ src/org/apache/qpid/commands/objects/ src/org/apache/qpid/utils/ test/org/apache/qpid/ test/org/apache/qpid/commands/ tes...
Date Fri, 09 Jan 2009 16:24:03 GMT
Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXConfiguration.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXConfiguration.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXConfiguration.java Fri Jan  9 08:24:01 2009
@@ -18,31 +18,12 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.utils;
 
-import org.apache.qpid.Command;
-
 import java.util.Map;
 
-public class JMXConfiguration {
+public class JMXConfiguration
+{
     private String hostname = "localhost";
     private String port = "8999";
     private String interval = "40000";
@@ -52,63 +33,81 @@
     private String username = null;
     private String password = null;
 
-    public JMXConfiguration(Map map) {
-        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.HOST_OPTION, map)) {
+    public JMXConfiguration(Map map)
+    {
+        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.HOST_OPTION, map))
+        {
             this.hostname = optionchecker(CommandLineOptionConstants.JMXCommandLineOptionConstants.HOST_OPTION, map);
         }
-        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.PORT_OPTION, map)) {
+        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.PORT_OPTION, map))
+        {
             this.port = optionchecker(CommandLineOptionConstants.JMXCommandLineOptionConstants.PORT_OPTION, map);
         }
-        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.REPORT_OPTION, map)) {
+        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.REPORT_OPTION, map))
+        {
 
-            this.report_file = optionchecker(CommandLineOptionConstants.JMXCommandLineOptionConstants.REPORT_OPTION, map);
+            this.report_file = optionchecker(CommandLineOptionConstants.JMXCommandLineOptionConstants.REPORT_OPTION,
+                    map);
         }
-        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.USER_OPTION, map)) {
+        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.USER_OPTION, map))
+        {
 
             this.setUsername(optionchecker(CommandLineOptionConstants.JMXCommandLineOptionConstants.USER_OPTION, map));
         }
 
-        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.PASSWORD_OPTION, map)) {
-            this.setPassword(optionchecker(CommandLineOptionConstants.JMXCommandLineOptionConstants.PASSWORD_OPTION, map));
+        if (checkoptionsetting(CommandLineOptionConstants.JMXCommandLineOptionConstants.PASSWORD_OPTION, map))
+        {
+            this.setPassword(optionchecker(CommandLineOptionConstants.JMXCommandLineOptionConstants.PASSWORD_OPTION,
+                    map));
         }
 
     }
 
-    public void sethostname(String hostname) {
+    public void sethostname(String hostname)
+    {
         this.hostname = hostname;
     }
 
-    public void setport(String port) {
+    public void setport(String port)
+    {
         this.port = port;
     }
 
-    public void setinterval(String interval) {
+    public void setinterval(String interval)
+    {
         this.interval = interval;
     }
 
-    public void setoutputpath(String output) {
+    public void setoutputpath(String output)
+    {
         this.outputpath = output;
     }
 
-    public String gethostname() {
+    public String gethostname()
+    {
         return this.hostname;
     }
 
-    public String getport() {
+    public String getport()
+    {
         return this.port;
     }
 
-    public String getinterval() {
+    public String getinterval()
+    {
         return this.interval;
     }
 
-    public String getoutputpath() {
+    public String getoutputpath()
+    {
         return this.outputpath;
     }
 
-    public CommandLineOption loadoption(String option, Map options) {
+    public CommandLineOption loadoption(String option, Map options)
+    {
         CommandLineOption op = null;
-        if (option != null) {
+        if (option != null)
+        {
             op = (CommandLineOption) options.get(option);
 
         }
@@ -116,21 +115,25 @@
 
     }
 
-    public void setreportfile(String reportfile) {
+    public void setreportfile(String reportfile)
+    {
         this.report_file = reportfile;
         this.isreport_mode = true;
 
     }
 
-    public boolean isreportmode() {
+    public boolean isreportmode()
+    {
         return this.isreport_mode;
     }
 
-    public String getreportfile() {
+    public String getreportfile()
+    {
         return this.report_file;
     }
 
-    public String optionchecker(String option_letter, Map map) {
+    public String optionchecker(String option_letter, Map map)
+    {
 
         if (map == null)
             return null;
@@ -141,7 +144,8 @@
         return value;
     }
 
-    public boolean checkoptionsetting(String option_letter, Map map) {
+    public boolean checkoptionsetting(String option_letter, Map map)
+    {
         if (map == null)
             return false;
         CommandLineOption option = (CommandLineOption) map.get(option_letter);

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXinfo.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXinfo.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXinfo.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXinfo.java Fri Jan  9 08:24:01 2009
@@ -1,4 +1,4 @@
- /*
+/*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -18,55 +18,36 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.utils;
 
 import javax.management.remote.JMXConnector;
 import javax.management.MBeanServerConnection;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 3, 2008
- * Time: 9:21:08 PM
- * To change this template use File | Settings | File Templates.
- */
-public class JMXinfo {
+public class JMXinfo
+{
     private JMXConnector jmxconnector;
     private CommandLineOptionParser input;
     private MBeanServerConnection mbserverconnector;
 
-    public JMXinfo(JMXConnector jmxc, CommandLineOptionParser input, MBeanServerConnection mbsc) {
+    public JMXinfo(JMXConnector jmxc, CommandLineOptionParser input, MBeanServerConnection mbsc)
+    {
         this.jmxconnector = jmxc;
         this.input = input;
         this.mbserverconnector = mbsc;
     }
 
-    public JMXConnector getjmxconnectot() {
+    public JMXConnector getjmxconnectot()
+    {
         return jmxconnector;
     }
 
-    public CommandLineOptionParser getCommandLineOptionParser() {
+    public CommandLineOptionParser getCommandLineOptionParser()
+    {
         return input;
     }
 
-    public MBeanServerConnection getmbserverconnector() {
+    public MBeanServerConnection getmbserverconnector()
+    {
         return mbserverconnector;
     }
 }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java Fri Jan  9 08:24:01 2009
@@ -18,23 +18,6 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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;
 
 import org.junit.runner.RunWith;
@@ -45,36 +28,14 @@
 import org.apache.qpid.utils.TestCommandLineOptionParser;
 import org.apache.qpid.utils.TestJMXConfiguration;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jul 7, 2008
- * Time: 1:09:50 PM
- * To change this template use File | Settings | File Templates.
- */
 @RunWith(Suite.class)
-@Suite.SuiteClasses({
-        TestCommand.class,
-        TestCommandExecutionEngine.class,
-        TestCommandLineOption.class,
-        TestCommandLineOptionParser.class,
-        TestConnector.class,
-        TestJMXConfiguration.class,
-        TestAllObject.class,
-        TestConnectionObject.class,
-        TestExchangeObject.class,
-        TestQueueObject.class,
-        TestVirtualHostObject.class,
-        TestUserManagementObject.class,
-        TestCommanddelete.class,
-        TestCommandlist.class,
-        TestCommandinfo.class,
-        TestCommandmove.class,
-        TestCommandview.class,
-        TestCommandviewcontent.class,
-        TestCommandLineInterpreter.class
-        
+@Suite.SuiteClasses( { TestCommand.class, TestCommandExecutionEngine.class, TestCommandLineOption.class,
+        TestCommandLineOptionParser.class, TestConnector.class, TestJMXConfiguration.class, TestAllObject.class,
+        TestConnectionObject.class, TestExchangeObject.class, TestQueueObject.class, TestVirtualHostObject.class,
+        TestUserManagementObject.class, TestCommanddelete.class, TestCommandlist.class, TestCommandinfo.class,
+        TestCommandmove.class, TestCommandview.class, TestCommandviewcontent.class, TestCommandLineInterpreter.class
 
-        })
-public class AllTest {
+})
+public class AllTest
+{
 }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java Fri Jan  9 08:24:01 2009
@@ -18,36 +18,13 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Aug 16, 2008
- * Time: 4:55:21 PM
- * To change this template use File | Settings | File Templates.
- */
-public interface ConnectionConstants {
-    String BROKER_HOSTNAME="localhost";
-    String BROKER_PORT="8999";
+public interface ConnectionConstants
+{
+    String BROKER_HOSTNAME = "localhost";
+    String BROKER_PORT = "8999";
     String USERNAME = "guest";
     String PASSWORD = "guest";
 }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java Fri Jan  9 08:24:01 2009
@@ -18,73 +18,56 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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;
 
-import junit.framework.TestCase;
-import org.apache.qpid.utils.JMXinfo;
+import java.io.IOException;
+
 import org.apache.qpid.utils.CommandLineOptionParser;
+import org.apache.qpid.utils.JMXinfo;
+import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.Assert;
-import org.junit.After;
-
-import java.io.IOException;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:06:25 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandExecutionEngine {
+public class TestCommandExecutionEngine
+{
     String line;
-    String [] command;
+    String[] command;
     CommandLineOptionParser commandlineoptionparser;
     JMXinfo info;
     CommandExecutionEngine engine;
     Connector connector;
-    @Before
-    public void setup() throws Exception{
 
-        connector = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+    @Before
+    public void setup() throws Exception
+    {
 
+        connector = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
 
     }
+
     @Test
     public void TestCommandSelector() throws Exception
     {
         line = "list -o queue";
         command = line.split(" ");
         commandlineoptionparser = new CommandLineOptionParser(command);
-        info = new JMXinfo(connector.getConnector(), commandlineoptionparser,connector.getMBeanServerConnection());
+        info = new JMXinfo(connector.getConnector(), commandlineoptionparser, connector.getMBeanServerConnection());
         engine = new CommandExecutionEngine(info);
-        Assert.assertEquals(engine.CommandSelector(),true);
+        Assert.assertEquals(engine.CommandSelector(), true);
     }
+
     @After
     public void cleanup()
     {
-        try {
+        try
+        {
             connector.getConnector().close();
-        } catch (IOException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+        catch (IOException e)
+        {
+            e.printStackTrace(); 
         }
     }
 }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java Fri Jan  9 08:24:01 2009
@@ -18,78 +18,58 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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;
 
-import junit.framework.TestCase;
-import org.apache.qpid.utils.JMXinfo;
+import javax.management.MBeanServerConnection;
+import javax.management.remote.JMXConnector;
+
 import org.apache.qpid.utils.CommandLineOptionParser;
-import org.apache.qpid.commands.Commandinfo;
+import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.Assert;
-import org.junit.After;
 
-import javax.management.remote.JMXConnector;
-import javax.management.MBeanServerConnection;
+public class TestCommandLineInterpreter
+{
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:08:52 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandLineInterpreter {
-
-//    CommandLineInterpreter test = new CommandLineInterpreter();
-    /* In this class there are only methodes which are displaying data on console so no test can be written*/
-    String command = "-h " + ConnectionConstants.BROKER_HOSTNAME + " -p " + ConnectionConstants.BROKER_PORT + " info -o queue -n ping -v test";
-    Connector conn= null;
-    JMXConnector jmxc=null;
-    MBeanServerConnection mbsc=null;
-    CommandLineOptionParser parser=null;
+    // CommandLineInterpreter test = new CommandLineInterpreter();
+    /*
+     * In this class there are only methodes which are displaying data on
+     * console so no test can be written
+     */
+    String command = "-h " + ConnectionConstants.BROKER_HOSTNAME + " -p " + ConnectionConstants.BROKER_PORT
+            + " info -o queue -n ping -v test";
+    Connector conn = null;
+    JMXConnector jmxc = null;
+    MBeanServerConnection mbsc = null;
+    CommandLineOptionParser parser = null;
 
+    String[] args = null;
 
-    String [] args = null;
     @Before
     public void startup() throws Exception
     {
         args = command.split(" ");
-//        System.out.println(args[0]);
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        // System.out.println(args[0]);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         jmxc = conn.getConnector();
         mbsc = conn.getMBeanServerConnection();
-        parser = new CommandLineOptionParser(args,args[0]);
+        parser = new CommandLineOptionParser(args, args[0]);
 
     }
+
     @Test
     public void TestSetQueryString() throws Exception
     {
-        CommandLineInterpreter.oneshotmode(args,parser,jmxc,mbsc);
-        Assert.assertEquals(args[0],"info");
-        Assert.assertEquals(args[1],"-o");
-        Assert.assertEquals(args[2],"queue");
-        Assert.assertEquals(args[3],"-n");
-        Assert.assertEquals(args[4],"ping");
-        Assert.assertEquals(args[5],"-v");
-        Assert.assertEquals(args[6],"test");
+        CommandLineInterpreter.oneshotmode(args, parser, jmxc, mbsc);
+        Assert.assertEquals(args[0], "info");
+        Assert.assertEquals(args[1], "-o");
+        Assert.assertEquals(args[2], "queue");
+        Assert.assertEquals(args[3], "-n");
+        Assert.assertEquals(args[4], "ping");
+        Assert.assertEquals(args[5], "-v");
+        Assert.assertEquals(args[6], "test");
     }
 
     @After
@@ -98,4 +78,3 @@
 
     }
 }
-

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java Fri Jan  9 08:24:01 2009
@@ -1,64 +1,38 @@
 /*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
+ * 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;
 
-import junit.framework.TestCase;
+import java.io.IOException;
 
-import javax.management.remote.JMXServiceURL;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXConnector;
 import javax.management.MBeanServerConnection;
-import java.net.MalformedURLException;
-import java.io.IOException;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXServiceURL;
 
-import org.junit.Test;
-import org.junit.Before;
 import org.junit.After;
 import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:11:50 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestConnector {
+public class TestConnector
+{
     Connector test;
     JMXServiceURL svc_url;
     JMXConnector connector;
@@ -67,33 +41,39 @@
     @Before
     public void setup() throws Exception
     {
-        test = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        test = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         String url = "service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi";
 
     }
-    
+
     @Test
     public void testGetConnector()
     {
-        Assert.assertEquals(test.getConnector(),test.getConnector());
+        Assert.assertEquals(test.getConnector(), test.getConnector());
     }
+
     @Test
     public void testGetMBeanServerConnection()
     {
-        Assert.assertEquals(test.getMBeanServerConnection(),test.getMBeanServerConnection());
+        Assert.assertEquals(test.getMBeanServerConnection(), test.getMBeanServerConnection());
     }
+
     @After
     public void cleanup()
     {
-          try {
+        try
+        {
 
-              test.getConnector().close();
-              test = null;
-        } catch (IOException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+            test.getConnector().close();
+            test = null;
+        }
+        catch (IOException e)
+        {
+            e.printStackTrace(); // To change body of catch statement use File |
+                                 // Settings | File Templates.
         }
         test = null;
     }
 
-
 }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestReportGenerator.java Fri Jan  9 08:24:01 2009
@@ -1,50 +1,26 @@
 /*
-*
-* 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.
-*
-*/
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
+ * 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;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Aug 13, 2008
- * Time: 7:16:17 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestReportGenerator {
-    
-    
+public class TestReportGenerator
+{
+
 }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java Fri Jan  9 08:24:01 2009
@@ -18,77 +18,56 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands;
 
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.framework.JUnit4TestAdapter;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.After;
-import org.junit.Assert;
+import javax.management.MBeanServerConnection;
+
 import org.apache.qpid.Command;
+import org.apache.qpid.ConnectionConstants;
 import org.apache.qpid.Connector;
 import org.apache.qpid.ConnectorFactory;
-import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.utils.JMXinfo;
 import org.apache.qpid.utils.CommandLineOptionParser;
+import org.apache.qpid.utils.JMXinfo;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:21:32 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommand{
+public class TestCommand
+{
     String command = "list -o queue";
-    String [] list;
+    String[] list;
     Connector test;
     MBeanServerConnection mbsc;
     JMXinfo info;
     CommandLineOptionParser parser;
     Command cmd;
+
     @Before
     public void setup() throws Exception
     {
         list = command.split(" ");
         parser = new CommandLineOptionParser(list);
-        test = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
-        info = new JMXinfo(test.getConnector(),parser,test.getMBeanServerConnection());
+        test = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        info = new JMXinfo(test.getConnector(), parser, test.getMBeanServerConnection());
         cmd = new Commandinfo(info);
 
     }
+
     @Test
     public void TestOptionChecker()
     {
-        Assert.assertEquals(cmd.optionchecker("o"),"queue");
+        Assert.assertEquals(cmd.optionchecker("o"), "queue");
     }
+
     @Test
     public void TestCheckOptionSetting()
     {
-         Assert.assertEquals(cmd.checkoptionsetting("o"),true);
-        Assert.assertEquals(cmd.checkoptionsetting("p"),false);
+        Assert.assertEquals(cmd.checkoptionsetting("o"), true);
+        Assert.assertEquals(cmd.checkoptionsetting("p"), false);
     }
+
     @After
     public void cleanup()
     {

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java Fri Jan  9 08:24:01 2009
@@ -18,23 +18,6 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands;
 
 import org.junit.After;
@@ -50,48 +33,45 @@
 import javax.management.remote.JMXConnector;
 import javax.management.MBeanServerConnection;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Aug 11, 2008
- * Time: 10:13:45 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommanddelete {
-    JMXinfo info=null;
+public class TestCommanddelete
+{
+    JMXinfo info = null;
     String command = "delete -o queue -n ping -v test -t 1";
     Commanddelete delete = null;
     Connector conn;
+
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         JMXConnector jmxc = conn.getConnector();
         MBeanServerConnection mbsc = conn.getMBeanServerConnection();
         CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
-        info = new JMXinfo(jmxc,parser,mbsc);
+        info = new JMXinfo(jmxc, parser, mbsc);
         delete = new Commanddelete(info);
 
-
-
     }
+
     @Test
     public void TestSetQueryString()
     {
-         delete.execute();
-        Assert.assertEquals(delete.getObject(),"queue");
-        Assert.assertEquals(delete.getVirtualhost(),"test");
-        Assert.assertEquals(delete.getName(),"ping");
-        Assert.assertEquals(delete.getnumber(),1);
+        delete.execute();
+        Assert.assertEquals(delete.getObject(), "queue");
+        Assert.assertEquals(delete.getVirtualhost(), "test");
+        Assert.assertEquals(delete.getName(), "ping");
+        Assert.assertEquals(delete.getnumber(), 1);
 
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java Fri Jan  9 08:24:01 2009
@@ -18,23 +18,6 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands;
 
 import org.apache.qpid.utils.JMXinfo;
@@ -50,44 +33,43 @@
 import javax.management.remote.JMXConnector;
 import javax.management.MBeanServerConnection;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Aug 16, 2008
- * Time: 6:30:24 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandinfo {
-      JMXinfo info=null;
+public class TestCommandinfo
+{
+    JMXinfo info = null;
     String command = "info -o queue -n ping -v test";
     CommandImpl infocommand = null;
     Connector conn = null;
+
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         JMXConnector jmxc = conn.getConnector();
         MBeanServerConnection mbsc = conn.getMBeanServerConnection();
         CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
-        info = new JMXinfo(jmxc,parser,mbsc);
+        info = new JMXinfo(jmxc, parser, mbsc);
         infocommand = new Commandinfo(info);
 
     }
+
     @Test
     public void TestSetQueryString()
     {
         infocommand.execute();
-        Assert.assertEquals(infocommand.getObject(),"queue");
-        Assert.assertEquals(infocommand.getVirtualhost(),"test");
-        Assert.assertEquals(infocommand.getName(),"ping");
+        Assert.assertEquals(infocommand.getObject(), "queue");
+        Assert.assertEquals(infocommand.getVirtualhost(), "test");
+        Assert.assertEquals(infocommand.getName(), "ping");
     }
 
     @After
     public void cleanup()
     {
-           try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java Fri Jan  9 08:24:01 2009
@@ -18,80 +18,62 @@
  * under the License.
  *
  */
- /*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands;
 
-import junit.framework.TestCase;
+import javax.management.MBeanServerConnection;
+import javax.management.remote.JMXConnector;
+
 import org.apache.qpid.ConnectionConstants;
 import org.apache.qpid.Connector;
 import org.apache.qpid.ConnectorFactory;
 import org.apache.qpid.utils.CommandLineOptionParser;
 import org.apache.qpid.utils.JMXinfo;
-import org.junit.Test;
-import org.junit.Before;
 import org.junit.After;
 import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.remote.JMXConnector;
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:18:28 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandlist {
-    /* All the methods in Commandlist doesn't have any arguments
-   and no return type.
-    */
-    JMXinfo info=null;
+public class TestCommandlist
+{
+    /*
+     * All the methods in Commandlist doesn't have any arguments and no return
+     * type.
+     */
+    JMXinfo info = null;
     String command = "list -o queue -n ping -v test";
     Commandlist list = null;
     Connector conn = null;
+
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         JMXConnector jmxc = conn.getConnector();
         MBeanServerConnection mbsc = conn.getMBeanServerConnection();
         CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
-        info = new JMXinfo(jmxc,parser,mbsc);
+        info = new JMXinfo(jmxc, parser, mbsc);
         list = new Commandlist(info);
 
     }
+
     @Test
     public void TestSetQueryString()
     {
         list.execute();
-        Assert.assertEquals(list.getObject(),"queue");
-        Assert.assertEquals(list.getVirtualhost(),"test");
-        Assert.assertEquals(list.getName(),"ping");
+        Assert.assertEquals(list.getObject(), "queue");
+        Assert.assertEquals(list.getVirtualhost(), "test");
+        Assert.assertEquals(list.getName(), "ping");
     }
 
     @After
     public void cleanup()
     {
-         try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java Fri Jan  9 08:24:01 2009
@@ -18,23 +18,6 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands;
 
 import org.apache.qpid.ConnectionConstants;
@@ -50,49 +33,46 @@
 import javax.management.remote.JMXConnector;
 import javax.management.MBeanServerConnection;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Aug 11, 2008
- * Time: 10:14:34 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandmove {
-    JMXinfo info=null;
+public class TestCommandmove
+{
+    JMXinfo info = null;
     String command = "move -o queue -n1 ping -v1 test -n2 message_queue -fmid 10 -tmid 12";
     Commandmove move = null;
-    Connector conn=null;
+    Connector conn = null;
+
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         JMXConnector jmxc = conn.getConnector();
         MBeanServerConnection mbsc = conn.getMBeanServerConnection();
         CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
-        info = new JMXinfo(jmxc,parser,mbsc);
+        info = new JMXinfo(jmxc, parser, mbsc);
         move = new Commandmove(info);
 
-
-
     }
+
     @Test
     public void TestSetQueryString()
     {
         move.execute();
-        Assert.assertEquals(move.getObject(),"queue");
-        Assert.assertEquals(move.getVirtualhost(),"test");
-        Assert.assertEquals(move.getname1(),"ping");
-        Assert.assertEquals(move.getname2(),"message_queue");
-        Assert.assertEquals(move.getfmid(),10);
-        Assert.assertEquals(move.gettmid(),12);
+        Assert.assertEquals(move.getObject(), "queue");
+        Assert.assertEquals(move.getVirtualhost(), "test");
+        Assert.assertEquals(move.getname1(), "ping");
+        Assert.assertEquals(move.getname2(), "message_queue");
+        Assert.assertEquals(move.getfmid(), 10);
+        Assert.assertEquals(move.gettmid(), 12);
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java Fri Jan  9 08:24:01 2009
@@ -18,23 +18,6 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands;
 
 import org.apache.qpid.ConnectionConstants;
@@ -50,45 +33,44 @@
 import javax.management.MBeanServerConnection;
 import javax.management.remote.JMXConnector;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Aug 11, 2008
- * Time: 10:14:58 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandview {
-    JMXinfo info=null;
+public class TestCommandview
+{
+    JMXinfo info = null;
     String command = "view -o queue -n ping -v test -t 10";
-    Commandview view =null;
-    Connector conn=null;
+    Commandview view = null;
+    Connector conn = null;
+
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         JMXConnector jmxc = conn.getConnector();
         MBeanServerConnection mbsc = conn.getMBeanServerConnection();
         CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
-        info = new JMXinfo(jmxc,parser,mbsc);
+        info = new JMXinfo(jmxc, parser, mbsc);
         view = new Commandview(info);
     }
+
     @Test
     public void TestSetQueryString()
     {
         view.execute();
-        Assert.assertEquals(view.getObject(),"queue");
-        Assert.assertEquals(view.getVirtualhost(),"test");
-        Assert.assertEquals(view.getName(),"ping");
-        Assert.assertEquals(view.getnumber(),10);
+        Assert.assertEquals(view.getObject(), "queue");
+        Assert.assertEquals(view.getVirtualhost(), "test");
+        Assert.assertEquals(view.getName(), "ping");
+        Assert.assertEquals(view.getnumber(), 10);
 
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java Fri Jan  9 08:24:01 2009
@@ -18,23 +18,6 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands;
 
 import org.apache.qpid.utils.JMXinfo;
@@ -50,47 +33,44 @@
 import javax.management.remote.JMXConnector;
 import javax.management.MBeanServerConnection;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Aug 11, 2008
- * Time: 10:15:17 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandviewcontent {
-    JMXinfo info=null;
+public class TestCommandviewcontent
+{
+    JMXinfo info = null;
     String command = "viewcontent -o queue -n ping -v test -id 10";
-    Commandviewcontent viewcontent =null;
+    Commandviewcontent viewcontent = null;
     Connector conn = null;
+
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         JMXConnector jmxc = conn.getConnector();
         MBeanServerConnection mbsc = conn.getMBeanServerConnection();
         CommandLineOptionParser parser = new CommandLineOptionParser(command.split(" "));
-        info = new JMXinfo(jmxc,parser,mbsc);
+        info = new JMXinfo(jmxc, parser, mbsc);
         viewcontent = new Commandviewcontent(info);
 
-
-
     }
+
     @Test
     public void TestSetQueryString()
     {
         viewcontent.execute();
-        Assert.assertEquals(viewcontent.getObject(),"queue");
-        Assert.assertEquals(viewcontent.getnumber(),10);
-        Assert.assertEquals(viewcontent.getName(),"ping");
-        Assert.assertEquals(viewcontent.getVirtualhost(),"test");
+        Assert.assertEquals(viewcontent.getObject(), "queue");
+        Assert.assertEquals(viewcontent.getnumber(), 10);
+        Assert.assertEquals(viewcontent.getName(), "ping");
+        Assert.assertEquals(viewcontent.getVirtualhost(), "test");
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java Fri Jan  9 08:24:01 2009
@@ -18,43 +18,18 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands.objects;
 
-import junit.framework.TestCase;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.After;
-import org.junit.Assert;
+import javax.management.MBeanServerConnection;
+
 import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.ConnectorFactory;
 import org.apache.qpid.Connector;
+import org.apache.qpid.ConnectorFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:23:25 PM
- * To change this template use File | Settings | File Templates.
- */
 public class TestAllObject {
     Connector conn;
     MBeanServerConnection mbsc;

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java Fri Jan  9 08:24:01 2009
@@ -18,87 +18,63 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands.objects;
 
-import junit.framework.TestCase;
+import javax.management.MBeanServerConnection;
 
 import org.apache.qpid.ConnectionConstants;
-import org.apache.qpid.ConnectorFactory;
 import org.apache.qpid.Connector;
+import org.apache.qpid.ConnectorFactory;
 import org.junit.After;
-import org.junit.Test;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:24:14 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestConnectionObject {
+public class TestConnectionObject
+{
     Connector conn;
     MBeanServerConnection mbsc;
     ConnectionObject test;
-    String test1,test2,test3;
+    String test1, test2, test3;
 
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         mbsc = conn.getMBeanServerConnection();
         test = new ConnectionObject(mbsc);
         test1 = "ping";
         test2 = "test";
         test3 = "object";
 
-
     }
+
     @Test
     public void TestSetQueryString()
     {
-        test.setQueryString(test3,test1,null);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=Connection,name=ping,*");
+        test.setQueryString(test3, test1, null);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=Connection,VirtualHost=test,*");
+        test.setQueryString(test3, null, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,VirtualHost=test,*");
         test.querystring = null;
-        test.setQueryString(test3,test1,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=Connection,VirtualHost=test,name=ping,*");
+        test.setQueryString(test3, test1, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,VirtualHost=test,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,null);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=Connection,*");
-
-
+        test.setQueryString(test3, null, null);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=Connection,*");
 
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java Fri Jan  9 08:24:01 2009
@@ -18,84 +18,63 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands.objects;
 
-import junit.framework.TestCase;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.After;
-import org.junit.Before;
+import javax.management.MBeanServerConnection;
+
 import org.apache.qpid.ConnectionConstants;
 import org.apache.qpid.Connector;
 import org.apache.qpid.ConnectorFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:24:49 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestExchangeObject {
+public class TestExchangeObject
+{
     Connector conn;
     MBeanServerConnection mbsc;
     ExchangeObject test;
-    String test1,test2,test3;
+    String test1, test2, test3;
 
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         mbsc = conn.getMBeanServerConnection();
         test = new ExchangeObject(mbsc);
         test1 = "ping";
         test2 = "test";
         test3 = "object";
 
-
     }
+
     @Test
     public void TestSetQueryString()
     {
-        test.setQueryString(test3,test1,null);
-//        System.out.println(test.querystring);
-//        System.out.println("org.apache.qpid:type=VitualHost.Exchange,name=ping,*");
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.Exchange,name=ping,*");
+        test.setQueryString(test3, test1, null);
+        // System.out.println(test.querystring);
+        // System.out.println("org.apache.qpid:type=VitualHost.Exchange,name=ping,*");
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Exchange,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=test,*");
+        test.setQueryString(test3, null, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=test,*");
         test.querystring = null;
-        test.setQueryString(test3,test1,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=test,name=ping,*");
+        test.setQueryString(test3, test1, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=test,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,null);
+        test.setQueryString(test3, null, null);
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestObjectNames.java Fri Jan  9 08:24:01 2009
@@ -18,34 +18,9 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands.objects;
 
-import junit.framework.TestCase;
+public class TestObjectNames
+{
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:22:54 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestObjectNames {
-    
 }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java Fri Jan  9 08:24:01 2009
@@ -18,90 +18,66 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands.objects;
 
-import junit.framework.TestCase;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.After;
-import org.junit.Before;
+import javax.management.MBeanServerConnection;
+
 import org.apache.qpid.ConnectionConstants;
 import org.apache.qpid.Connector;
 import org.apache.qpid.ConnectorFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:25:21 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestQueueObject{
+public class TestQueueObject
+{
     Connector conn;
     MBeanServerConnection mbsc;
     QueueObject test;
-    String test1,test2,test3;
+    String test1, test2, test3;
 
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         mbsc = conn.getMBeanServerConnection();
         test = new QueueObject(mbsc);
         test1 = "ping";
         test2 = "test";
         test3 = "object";
 
-
     }
+
     @Test
     public void TestSetQueryString()
     {
-        test.setQueryString(test3,test1,null);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.Queue,name=ping,*");
+        test.setQueryString(test3, test1, null);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.Queue,VirtualHost=test,*");
+        test.setQueryString(test3, null, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,VirtualHost=test,*");
         test.querystring = null;
-        test.setQueryString(test3,test1,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.Queue,VirtualHost=test,name=ping,*");
+        test.setQueryString(test3, test1, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,VirtualHost=test,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,null);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.Queue,*");
-
-
+        test.setQueryString(test3, null, null);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.Queue,*");
 
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }
 
     }
 }
-

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java Fri Jan  9 08:24:01 2009
@@ -18,86 +18,57 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.commands.objects;
 
-import junit.framework.TestCase;
-import org.junit.Assert;
-import org.junit.After;
-import org.junit.Test;
-import org.junit.Before;
+import javax.management.MBeanServerConnection;
+
 import org.apache.qpid.ConnectionConstants;
 import org.apache.qpid.Connector;
 import org.apache.qpid.ConnectorFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:26:09 PM
- * To change this template use File | Settings | File Templates.
- */
-
-
-
-public class TestUserManagementObject{
+public class TestUserManagementObject
+{
     Connector conn;
     MBeanServerConnection mbsc;
     UserManagementObject test;
-    String test1,test2,test3;
+    String test1, test2, test3;
 
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         mbsc = conn.getMBeanServerConnection();
         test = new UserManagementObject(mbsc);
         test1 = "ping";
         test2 = "test";
         test3 = "object";
 
-
     }
+
     @Test
     public void TestSetQueryString()
     {
-        test.setQueryString(test3,test1,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=UserManagement,*");
-
-
-
+        test.setQueryString(test3, test1, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=UserManagement,*");
 
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }
 
     }
 }
-
-

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java Fri Jan  9 08:24:01 2009
@@ -1,86 +1,81 @@
 /*
-*
-* 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.
-*
-*/
+ *
+ * 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.commands.objects;
 
-import junit.framework.TestCase;
-import org.junit.Assert;
-import org.junit.After;
-import org.junit.Test;
-import org.junit.Before;
+import javax.management.MBeanServerConnection;
+
 import org.apache.qpid.ConnectionConstants;
 import org.apache.qpid.Connector;
 import org.apache.qpid.ConnectorFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import javax.management.MBeanServerConnection;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:26:40 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestVirtualHostObject{
+public class TestVirtualHostObject
+{
     Connector conn;
     MBeanServerConnection mbsc;
     VirtualHostObject test;
-    String test1,test2,test3;
+    String test1, test2, test3;
 
     @Before
     public void startup() throws Exception
     {
-        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME,ConnectionConstants.BROKER_PORT, ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
+        conn = ConnectorFactory.getConnector(ConnectionConstants.BROKER_HOSTNAME, ConnectionConstants.BROKER_PORT,
+                ConnectionConstants.USERNAME, ConnectionConstants.PASSWORD);
         mbsc = conn.getMBeanServerConnection();
         test = new VirtualHostObject(mbsc);
         test1 = "ping";
         test2 = "test";
         test3 = "object";
 
-
     }
+
     @Test
     public void TestSetQueryString()
     {
-        test.setQueryString(test3,test1,null);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.VirtualHostManager,name=ping,*");
+        test.setQueryString(test3, test1, null);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.VirtualHostManager,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=test,*");
+        test.setQueryString(test3, null, test2);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=test,*");
         test.querystring = null;
-        test.setQueryString(test3,test1,test2);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=test,name=ping,*");
+        test.setQueryString(test3, test1, test2);
+        Assert.assertEquals(test.querystring,
+                "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=test,name=ping,*");
         test.querystring = null;
-        test.setQueryString(test3,null,null);
-        Assert.assertEquals(test.querystring,"org.apache.qpid:type=VirtualHost.VirtualHostManager,*");
-
-
+        test.setQueryString(test3, null, null);
+        Assert.assertEquals(test.querystring, "org.apache.qpid:type=VirtualHost.VirtualHostManager,*");
 
     }
 
     @After
     public void cleanup()
     {
-        try{
+        try
+        {
             conn.getConnector().close();
-        }catch(Exception ex)
+        }
+        catch (Exception ex)
         {
             ex.printStackTrace();
         }

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOption.java Fri Jan  9 08:24:01 2009
@@ -18,43 +18,19 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.utils;
 
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.Assert;
-import org.junit.After;
 
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:17:26 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandLineOption {
+public class TestCommandLineOption
+{
     String input1;
     String input2;
     String options;
-    String [] list;
+    String[] list;
     CommandLineOption option;
 
     @Before
@@ -64,19 +40,22 @@
         input2 = "--help";
         options = "localhost testing";
         list = options.split(" ");
-        option = new CommandLineOption(input1,list);
-        
+        option = new CommandLineOption(input1, list);
+
     }
+
     @Test
     public void TestGetOptinValue()
     {
-        Assert.assertEquals(option.getOptionValue(),"localhost");
+        Assert.assertEquals(option.getOptionValue(), "localhost");
     }
+
     @Test
     public void TestGetOptionType()
     {
-        Assert.assertEquals(option.getOptionType(),"h");
+        Assert.assertEquals(option.getOptionType(), "h");
     }
+
     @After
     public void cleanup()
     {

Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java?rev=733073&r1=733072&r2=733073&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java (original)
+++ qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/utils/TestCommandLineOptionParser.java Fri Jan  9 08:24:01 2009
@@ -18,49 +18,26 @@
  * under the License.
  *
  */
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    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.utils;
 
-import junit.framework.TestCase;
-import org.junit.Before;
-import org.junit.Test;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.junit.After;
 import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ArrayList;
-
-/**
- * Created by IntelliJ IDEA.
- * User: lahiru
- * Date: Jun 30, 2008
- * Time: 12:16:30 PM
- * To change this template use File | Settings | File Templates.
- */
-public class TestCommandLineOptionParser {
+public class TestCommandLineOptionParser
+{
     CommandLineOptionParser parser;
-    String [] input;
+    String[] input;
     CommandLineOption option1;
     CommandLineOption option2;
     ArrayList list1;
     ArrayList list2;
+
     @Before
     public void setup()
     {
@@ -70,6 +47,7 @@
         list1 = new ArrayList();
         list2 = new ArrayList();
     }
+
     @Test
     public void TestParse()
     {
@@ -77,18 +55,19 @@
 
         list1.add("localhost");
         list2.add("23232");
-        option1 = new CommandLineOption("h",list1);
-        option2 = new CommandLineOption("p",list2);
-        hash.put("h",option1);
-        hash.put("p",option2);
-        option1 = (CommandLineOption)parser.parse(input).get("h");
-        Assert.assertEquals(option1.getOptionType(),"h");
-        Assert.assertEquals(option1.getOptionValue(),"localhost");
-        option1 = (CommandLineOption)parser.parse(input).get("p");
-        Assert.assertEquals(option1.getOptionType(),"p");
-        Assert.assertEquals(option1.getOptionValue(),"23232");
-        Assert.assertEquals(parser.parse(input).size(),hash.size());
+        option1 = new CommandLineOption("h", list1);
+        option2 = new CommandLineOption("p", list2);
+        hash.put("h", option1);
+        hash.put("p", option2);
+        option1 = (CommandLineOption) parser.parse(input).get("h");
+        Assert.assertEquals(option1.getOptionType(), "h");
+        Assert.assertEquals(option1.getOptionValue(), "localhost");
+        option1 = (CommandLineOption) parser.parse(input).get("p");
+        Assert.assertEquals(option1.getOptionType(), "p");
+        Assert.assertEquals(option1.getOptionValue(), "23232");
+        Assert.assertEquals(parser.parse(input).size(), hash.size());
     }
+
     @After
     public void cleanup()
     {



Mime
View raw message