You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/07/24 17:47:29 UTC

git commit: Make sure the tests are moved as well

Repository: cxf
Updated Branches:
  refs/heads/master c9a58c10a -> f942e1e15


Make sure the tests are moved as well


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

Branch: refs/heads/master
Commit: f942e1e15d6c4fa83e305eb7452dca8fc80cbdcf
Parents: c9a58c1
Author: Daniel Kulp <dk...@apache.org>
Authored: Thu Jul 24 11:45:30 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Thu Jul 24 11:45:30 2014 -0400

----------------------------------------------------------------------
 .../http_jaxws_spi/HttpHandlerImplTest.java     |  67 ++++++++++
 .../JAXWSHttpSpiDestinationTest.java            | 124 +++++++++++++++++++
 .../JAXWSHttpSpiTransportFactoryTest.java       |  82 ++++++++++++
 .../http_jaxws_spi/HttpHandlerImplTest.java     |  67 ----------
 .../JAXWSHttpSpiDestinationTest.java            | 124 -------------------
 .../JAXWSHttpSpiTransportFactoryTest.java       |  82 ------------
 6 files changed, 273 insertions(+), 273 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f942e1e1/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java b/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java
new file mode 100644
index 0000000..3a5aef1
--- /dev/null
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java
@@ -0,0 +1,67 @@
+/**
+ * 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.cxf.transport.http_jaxws_spi;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.spi.http.HttpExchange;
+import javax.xml.ws.spi.http.HttpHandler;
+
+import org.easymock.EasyMock;
+import org.easymock.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class HttpHandlerImplTest extends Assert {
+    
+    private IMocksControl control;
+    private HttpHandler handler;
+    private JAXWSHttpSpiDestination destination;
+    private HttpExchange exchange;
+    
+    @Before
+    public void setUp() {
+        control = EasyMock.createNiceControl();
+        destination = control.createMock(JAXWSHttpSpiDestination.class);
+        handler = new HttpHandlerImpl(destination);
+        exchange = control.createMock(HttpExchange.class);
+    }
+    
+    @After
+    public void tearDown() {
+        exchange = null;
+        handler = null;
+        destination = null;
+        control = null;
+    }
+    
+    @Test
+    public void testHttpHandlerImpl() throws Exception {
+        exchange.close();
+        destination.doService(EasyMock.isA(HttpServletRequest.class),
+                              EasyMock.isA(HttpServletResponse.class));
+        control.replay();
+        
+        handler.handle(exchange);
+        control.verify();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/f942e1e1/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java b/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
new file mode 100644
index 0000000..d17940d
--- /dev/null
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
@@ -0,0 +1,124 @@
+/**
+ * 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.cxf.transport.http_jaxws_spi;
+
+import java.io.OutputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.ws.spi.http.HttpContext;
+import javax.xml.ws.spi.http.HttpExchange;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.MessageObserver;
+import org.apache.cxf.transport.http.DestinationRegistryImpl;
+import org.easymock.EasyMock;
+import org.easymock.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.isA;
+
+public class JAXWSHttpSpiDestinationTest extends Assert {
+    
+    private static final String ADDRESS = "http://localhost:80/foo/bar";
+    private static final String CONTEXT_PATH = "/foo";
+    private IMocksControl control; 
+    private Bus bus;
+    private HttpContext context;
+    private MessageObserver observer;
+    private EndpointInfo endpoint;
+    
+    @Before
+    public void setUp() {
+        control = EasyMock.createNiceControl();
+        bus = control.createMock(Bus.class);
+        bus.getExtension(org.apache.cxf.policy.PolicyDataEngine.class);
+        EasyMock.expectLastCall().andReturn(null).anyTimes();
+        observer = control.createMock(MessageObserver.class);
+        context = control.createMock(HttpContext.class);
+        endpoint = new EndpointInfo();
+        endpoint.setAddress(ADDRESS);
+    }
+    
+    @After
+    public void tearDown() {
+        context = null;
+        bus = null;
+        observer = null;
+    }
+    
+    @Test
+    public void testCtor() throws Exception {
+        control.replay();
+        JAXWSHttpSpiDestination destination = 
+            new JAXWSHttpSpiDestination(bus, new DestinationRegistryImpl(), endpoint);
+
+        assertNull(destination.getMessageObserver());
+        assertNotNull(destination.getAddress());
+        assertNotNull(destination.getAddress().getAddress());
+        assertEquals(ADDRESS, 
+                     destination.getAddress().getAddress().getValue());
+    }
+    
+    @Test
+    public void testMessage() throws Exception {
+        HttpExchange exchange = setUpExchange();
+        control.replay();
+
+        JAXWSHttpSpiDestination destination = 
+            new JAXWSHttpSpiDestination(bus, new DestinationRegistryImpl(), endpoint);
+        destination.setMessageObserver(observer);
+
+        destination.doService(new HttpServletRequestAdapter(exchange),
+                              new HttpServletResponseAdapter(exchange));
+
+        control.verify();
+    }
+    
+
+    private HttpExchange setUpExchange() throws Exception {
+        HttpExchange exchange = control.createMock(HttpExchange.class);
+        expect(exchange.getHttpContext()).andReturn(context).anyTimes();
+        expect(exchange.getQueryString()).andReturn(null);
+        expect(exchange.getPathInfo()).andReturn(null);
+        expect(exchange.getRequestURI()).andReturn(CONTEXT_PATH);
+        expect(exchange.getContextPath()).andReturn(CONTEXT_PATH);
+        Map<String, List<String>> reqHeaders = new HashMap<String, List<String>>();
+        reqHeaders.put("Content-Type", Collections.singletonList("text/xml"));
+        expect(exchange.getRequestHeaders()).andReturn(reqHeaders).anyTimes();
+        OutputStream responseBody = control.createMock(OutputStream.class);
+        responseBody.flush();
+        EasyMock.expectLastCall();
+        expect(exchange.getResponseBody()).andReturn(responseBody).anyTimes();
+        observer.onMessage(isA(Message.class));
+        EasyMock.expectLastCall();
+        
+        return exchange;
+    }
+    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/f942e1e1/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java b/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java
new file mode 100644
index 0000000..cd825b8
--- /dev/null
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java
@@ -0,0 +1,82 @@
+/**
+ * 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.cxf.transport.http_jaxws_spi;
+
+import javax.xml.ws.spi.http.HttpContext;
+import javax.xml.ws.spi.http.HttpHandler;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.Destination;
+import org.easymock.EasyMock;
+import org.easymock.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JAXWSHttpSpiTransportFactoryTest extends Assert {
+    
+    private IMocksControl control; 
+    private HttpContext context;
+    private JAXWSHttpSpiTransportFactory factory;
+    private Bus bus;
+
+    @Before
+    public void setUp() {
+        control = EasyMock.createNiceControl();
+        context = control.createMock(HttpContext.class);
+        bus = control.createMock(Bus.class);
+        factory = new JAXWSHttpSpiTransportFactory(context);
+    }
+    
+    @After
+    public void tearDown() {
+        factory = null;
+        context = null;
+        bus = null;
+    }
+    
+    @Test
+    public void testGetDestination1() throws Exception {
+        getDestination("/bar");
+    }
+    
+    @Test
+    public void testGetDestination2() throws Exception {
+        getDestination("http://localhost:8080/foo/bar");
+    }
+    
+    public void getDestination(String endpointAddress) throws Exception {
+        context.setHandler(EasyMock.isA(HttpHandler.class));
+        control.replay();
+        
+        EndpointInfo endpoint = new EndpointInfo();
+        endpoint.setAddress(endpointAddress);
+        
+        Destination destination = factory.getDestination(endpoint, bus);
+        assertNotNull(destination);
+        assertNotNull(destination.getAddress());
+        assertNotNull(destination.getAddress().getAddress());
+        assertEquals(endpointAddress, destination.getAddress().getAddress().getValue());
+        assertEquals(endpointAddress, endpoint.getAddress());
+        control.verify();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/f942e1e1/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java b/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java
deleted file mode 100644
index 3a5aef1..0000000
--- a/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpHandlerImplTest.java
+++ /dev/null
@@ -1,67 +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.cxf.transport.http_jaxws_spi;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.ws.spi.http.HttpExchange;
-import javax.xml.ws.spi.http.HttpHandler;
-
-import org.easymock.EasyMock;
-import org.easymock.IMocksControl;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class HttpHandlerImplTest extends Assert {
-    
-    private IMocksControl control;
-    private HttpHandler handler;
-    private JAXWSHttpSpiDestination destination;
-    private HttpExchange exchange;
-    
-    @Before
-    public void setUp() {
-        control = EasyMock.createNiceControl();
-        destination = control.createMock(JAXWSHttpSpiDestination.class);
-        handler = new HttpHandlerImpl(destination);
-        exchange = control.createMock(HttpExchange.class);
-    }
-    
-    @After
-    public void tearDown() {
-        exchange = null;
-        handler = null;
-        destination = null;
-        control = null;
-    }
-    
-    @Test
-    public void testHttpHandlerImpl() throws Exception {
-        exchange.close();
-        destination.doService(EasyMock.isA(HttpServletRequest.class),
-                              EasyMock.isA(HttpServletResponse.class));
-        control.replay();
-        
-        handler.handle(exchange);
-        control.verify();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/f942e1e1/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java b/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
deleted file mode 100644
index d17940d..0000000
--- a/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
+++ /dev/null
@@ -1,124 +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.cxf.transport.http_jaxws_spi;
-
-import java.io.OutputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.ws.spi.http.HttpContext;
-import javax.xml.ws.spi.http.HttpExchange;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.transport.http.DestinationRegistryImpl;
-import org.easymock.EasyMock;
-import org.easymock.IMocksControl;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.isA;
-
-public class JAXWSHttpSpiDestinationTest extends Assert {
-    
-    private static final String ADDRESS = "http://localhost:80/foo/bar";
-    private static final String CONTEXT_PATH = "/foo";
-    private IMocksControl control; 
-    private Bus bus;
-    private HttpContext context;
-    private MessageObserver observer;
-    private EndpointInfo endpoint;
-    
-    @Before
-    public void setUp() {
-        control = EasyMock.createNiceControl();
-        bus = control.createMock(Bus.class);
-        bus.getExtension(org.apache.cxf.policy.PolicyDataEngine.class);
-        EasyMock.expectLastCall().andReturn(null).anyTimes();
-        observer = control.createMock(MessageObserver.class);
-        context = control.createMock(HttpContext.class);
-        endpoint = new EndpointInfo();
-        endpoint.setAddress(ADDRESS);
-    }
-    
-    @After
-    public void tearDown() {
-        context = null;
-        bus = null;
-        observer = null;
-    }
-    
-    @Test
-    public void testCtor() throws Exception {
-        control.replay();
-        JAXWSHttpSpiDestination destination = 
-            new JAXWSHttpSpiDestination(bus, new DestinationRegistryImpl(), endpoint);
-
-        assertNull(destination.getMessageObserver());
-        assertNotNull(destination.getAddress());
-        assertNotNull(destination.getAddress().getAddress());
-        assertEquals(ADDRESS, 
-                     destination.getAddress().getAddress().getValue());
-    }
-    
-    @Test
-    public void testMessage() throws Exception {
-        HttpExchange exchange = setUpExchange();
-        control.replay();
-
-        JAXWSHttpSpiDestination destination = 
-            new JAXWSHttpSpiDestination(bus, new DestinationRegistryImpl(), endpoint);
-        destination.setMessageObserver(observer);
-
-        destination.doService(new HttpServletRequestAdapter(exchange),
-                              new HttpServletResponseAdapter(exchange));
-
-        control.verify();
-    }
-    
-
-    private HttpExchange setUpExchange() throws Exception {
-        HttpExchange exchange = control.createMock(HttpExchange.class);
-        expect(exchange.getHttpContext()).andReturn(context).anyTimes();
-        expect(exchange.getQueryString()).andReturn(null);
-        expect(exchange.getPathInfo()).andReturn(null);
-        expect(exchange.getRequestURI()).andReturn(CONTEXT_PATH);
-        expect(exchange.getContextPath()).andReturn(CONTEXT_PATH);
-        Map<String, List<String>> reqHeaders = new HashMap<String, List<String>>();
-        reqHeaders.put("Content-Type", Collections.singletonList("text/xml"));
-        expect(exchange.getRequestHeaders()).andReturn(reqHeaders).anyTimes();
-        OutputStream responseBody = control.createMock(OutputStream.class);
-        responseBody.flush();
-        EasyMock.expectLastCall();
-        expect(exchange.getResponseBody()).andReturn(responseBody).anyTimes();
-        observer.onMessage(isA(Message.class));
-        EasyMock.expectLastCall();
-        
-        return exchange;
-    }
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/f942e1e1/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java b/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java
deleted file mode 100644
index cd825b8..0000000
--- a/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiTransportFactoryTest.java
+++ /dev/null
@@ -1,82 +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.cxf.transport.http_jaxws_spi;
-
-import javax.xml.ws.spi.http.HttpContext;
-import javax.xml.ws.spi.http.HttpHandler;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.Destination;
-import org.easymock.EasyMock;
-import org.easymock.IMocksControl;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class JAXWSHttpSpiTransportFactoryTest extends Assert {
-    
-    private IMocksControl control; 
-    private HttpContext context;
-    private JAXWSHttpSpiTransportFactory factory;
-    private Bus bus;
-
-    @Before
-    public void setUp() {
-        control = EasyMock.createNiceControl();
-        context = control.createMock(HttpContext.class);
-        bus = control.createMock(Bus.class);
-        factory = new JAXWSHttpSpiTransportFactory(context);
-    }
-    
-    @After
-    public void tearDown() {
-        factory = null;
-        context = null;
-        bus = null;
-    }
-    
-    @Test
-    public void testGetDestination1() throws Exception {
-        getDestination("/bar");
-    }
-    
-    @Test
-    public void testGetDestination2() throws Exception {
-        getDestination("http://localhost:8080/foo/bar");
-    }
-    
-    public void getDestination(String endpointAddress) throws Exception {
-        context.setHandler(EasyMock.isA(HttpHandler.class));
-        control.replay();
-        
-        EndpointInfo endpoint = new EndpointInfo();
-        endpoint.setAddress(endpointAddress);
-        
-        Destination destination = factory.getDestination(endpoint, bus);
-        assertNotNull(destination);
-        assertNotNull(destination.getAddress());
-        assertNotNull(destination.getAddress().getAddress());
-        assertEquals(endpointAddress, destination.getAddress().getAddress().getValue());
-        assertEquals(endpointAddress, endpoint.getAddress());
-        control.verify();
-    }
-    
-}