1/*2 * Copyright 2001-2009 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * http://www.apache.org/licenses/LICENSE-2.08 * 9 * Unless required by applicable law or agreed to in writing, software10 * distributed under the License is distributed on an "AS IS" BASIS,11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12 * See the License for the specific language governing permissions and13 * limitations under the License.14 */15package org.apache.juddi.v3.client.mapping;
1617import java.net.BindException;
18import java.net.URL;
1920import org.junit.Ignore;
21import org.junit.Test;
2223/**24 * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>25 */26publicclassUDDIServiceCacheTest {
2728 @Ignore
29 @Test(expected=BindException.class)
30publicvoid testPortTakenException() throws Throwable {
3132try {
33 String urlStr = "http://localhost:8080/subscriptionlistener_uddi_client";
34 URL url = new URL(urlStr);
35 URL url2 = new URL(url.getProtocol(),url.getHost(),url.getPort(),url.getFile());
36// String protocol = url.getProtocol();37// String host = url.getHost();38// String path = url.getPath();394041424344 System.out.println("");
45//UDDIServiceCache serviceCache = new UDDIServiceCache();464748//serviceCache.publishHttpCallbackEndpoint(new UDDIClientSubscriptionListenerImpl(),urlStr);4950 } catch (Throwable e) {
51if (e.getCause() instanceof BindException) {
52throw e.getCause();
53 }
54 }
55 }
565758 }