This project has retired. For details please refer to its Attic page.
UDDIInquiryJAXRSTest xref
View Javadoc
1   /*
2    * Copyright 2013 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 at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.juddi.api.impl.rest;
17  
18  import java.util.ArrayList;
19  import java.util.HashMap;
20  import java.util.List;
21  import java.util.Map;
22  import java.util.UUID;
23  import javax.ws.rs.WebApplicationException;
24  import org.junit.After;
25  import org.junit.Before;
26  import org.uddi.api_v3.BindingTemplate;
27  import org.uddi.api_v3.BusinessEntity;
28  import org.uddi.api_v3.BusinessService;
29  import org.uddi.api_v3.OperationalInfo;
30  import org.uddi.api_v3.TModel;
31  
32  import javax.ws.rs.core.Response;
33  
34  import org.apache.cxf.endpoint.Server;
35  import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
36  import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
37  import org.apache.cxf.jaxrs.client.WebClient;
38  import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
39  import org.apache.cxf.jaxrs.provider.json.JSONProvider;
40  import org.apache.juddi.Registry;
41  import org.apache.juddi.api_v3.rest.UriContainer;
42  
43  import org.junit.Test;
44  import org.junit.Assert;
45  import org.junit.BeforeClass;
46  import org.junit.AfterClass;
47  import org.uddi.sub_v3.KeyBag;
48  
49  /**
50   * test cases for the jUDDI Inquiry REST service
51   *
52   * @author Alex O'Ree
53   */
54  //@RunWith(SpringJUnit4ClassRunner.class)
55  //@ContextConfiguration(locations = { "classpath:applicationContext-test.xml" })
56  public class UDDIInquiryJAXRSTest extends Assert {
57  
58          private final static String ENDPOINT_ADDRESS = "http://localhost:8080/rest";
59          private final static String JUDDI_BIZ ="uddi:juddi.apache.org:node1";
60          private final static String JUDDI_SVC = "uddi:juddi.apache.org:services-inquiry";
61          private final static String JUDDI_BT = "uddi:juddi.apache.org:servicebindings-inquiry-ws";
62          private final static String JUDDI_TMODEL = "uddi:uddi.org:transport:smtp";
63          private final static String WADL_ADDRESS = ENDPOINT_ADDRESS + "?_wadl";
64          private static Server server;
65          UDDIInquiryJAXRS instance = null;
66  
67          public UDDIInquiryJAXRSTest() {
68  
69                  List<Object> providers = new ArrayList<Object>();
70                  // add custom providers if any
71                  providers.add(new org.apache.cxf.jaxrs.provider.JAXBElementProvider());
72  
73                  Map<String, Object> properties = new HashMap<String, Object>();
74  
75  // Create a mapping between the XML namespaces and the JSON prefixes.
76  // The JSON prefix can be "" to specify that you don't want any prefix.
77                  HashMap<String, String> nstojns = new HashMap<String, String>();
78                  nstojns.put("urn:uddi-org:api_v3", "urn:uddi-org:api_v3");
79                  nstojns.put("urn:uddi-org:sub_v3", "urn:uddi-org:sub_v3");
80                  nstojns.put("urn:uddi-org:custody_v3", "urn:uddi-org:custody_v3");
81                  nstojns.put("urn:uddi-org:repl_v3", "urn:uddi-org:repl_v3");
82                  nstojns.put("urn:uddi-org:subr_v3", "urn:uddi-org:subr_v3");
83                  nstojns.put("urn:uddi-org:repl_v3", "urn:uddi-org:repl_v3");
84                  nstojns.put("urn:uddi-org:vs_v3", "urn:uddi-org:vs_v3");
85                  nstojns.put("urn:uddi-org:vscache_v3", "urn:uddi-org:vscache_v3");
86                  nstojns.put("urn:uddi-org:policy_v3", "urn:uddi-org:policy_v3");
87                  nstojns.put("urn:uddi-org:policy_instanceParms_v3", "urn:uddi-org:policy_instanceParms_v3");
88                  nstojns.put("http://www.w3.org/2000/09/xmldsig#", "http://www.w3.org/2000/09/xmldsig#");
89  
90                  properties.put("namespaceMap", nstojns);
91                  JSONProvider jsonProvider = new org.apache.cxf.jaxrs.provider.json.JSONProvider();
92                  jsonProvider.setNamespaceMap(nstojns);
93  
94                  providers.add(jsonProvider);
95                  instance = JAXRSClientFactory.create(ENDPOINT_ADDRESS, UDDIInquiryJAXRS.class, providers);
96          }
97  
98          @BeforeClass
99          public static void initialize() throws Exception {
100                 startServer();
101                 waitForWADL();
102                 Registry.start();
103         }
104 
105         @AfterClass
106         public static void destroy() throws Exception {
107                 Registry.stop();
108                 server.stop();
109                 server.destroy();
110         }
111 
112         @Before
113         public void setUp() {
114         }
115 
116         @After
117         public void tearDown() {
118         }
119 
120         private static void startServer() throws Exception {
121                 JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
122                 sf.setResourceClasses(UDDIInquiryJAXRS.class);
123 
124                 List<Object> providers = new ArrayList<Object>();
125                 // add custom providers if any
126                 providers.add(new org.apache.cxf.jaxrs.provider.JAXBElementProvider());
127 
128                 Map<String, Object> properties = new HashMap<String, Object>();
129 
130 // Create a mapping between the XML namespaces and the JSON prefixes.
131 // The JSON prefix can be "" to specify that you don't want any prefix.
132                 HashMap<String, String> nstojns = new HashMap<String, String>();
133                 nstojns.put("urn:uddi-org:api_v3", "urn:uddi-org:api_v3");
134                 nstojns.put("urn:uddi-org:sub_v3", "urn:uddi-org:sub_v3");
135                 nstojns.put("urn:uddi-org:custody_v3", "urn:uddi-org:custody_v3");
136                 nstojns.put("urn:uddi-org:repl_v3", "urn:uddi-org:repl_v3");
137                 nstojns.put("urn:uddi-org:subr_v3", "urn:uddi-org:subr_v3");
138                 nstojns.put("urn:uddi-org:repl_v3", "urn:uddi-org:repl_v3");
139                 nstojns.put("urn:uddi-org:vs_v3", "urn:uddi-org:vs_v3");
140                 nstojns.put("urn:uddi-org:vscache_v3", "urn:uddi-org:vscache_v3");
141                 nstojns.put("urn:uddi-org:policy_v3", "urn:uddi-org:policy_v3");
142                 nstojns.put("urn:uddi-org:policy_instanceParms_v3", "urn:uddi-org:policy_instanceParms_v3");
143                 nstojns.put("http://www.w3.org/2000/09/xmldsig#", "http://www.w3.org/2000/09/xmldsig#");
144 
145                 properties.put("namespaceMap", nstojns);
146                 JSONProvider jsonProvider = new org.apache.cxf.jaxrs.provider.json.JSONProvider();
147                 jsonProvider.setNamespaceMap(nstojns);
148 
149                 providers.add(jsonProvider);
150                 sf.setProviders(providers);
151 
152                 sf.setResourceProvider(UDDIInquiryJAXRS.class,
153                         new SingletonResourceProvider(new UDDIInquiryJAXRS(), true));
154                 sf.setAddress(ENDPOINT_ADDRESS);
155 
156                 server = sf.create();
157         }
158 
159         // Optional step - may be needed to ensure that by the time individual
160 // tests start running the endpoint has been fully initialized
161         private static void waitForWADL() throws Exception {
162                 WebClient client = WebClient.create(WADL_ADDRESS);
163                 // wait for 20 secs or so
164                 for (int i = 0; i < 20; i++) {
165                         Thread.currentThread().sleep(1000);
166                         Response response = client.get();
167                         if (response.getStatus() == 200) {
168                                 break;
169                         }
170                 }
171                 // no WADL is available yet - throw an exception or give tests a chance to run anyway
172         }
173 
174         /**
175          * Test of getBusinessDetailJSON method, of class UDDIInquiryJAXRS.
176          */
177         @Test(expected = WebApplicationException.class)
178         public void testGetBusinessDetailJSON_NULL() {
179                 System.out.println("testGetBusinessDetailJSON_NULL");
180 
181                 String id = UUID.randomUUID().toString();
182 
183                 BusinessEntity expResult = null;
184                 BusinessEntity result = instance.getBusinessDetailJSON(id);
185         }
186 
187         /**
188          * Test of getBusinessDetailXML method, of class UDDIInquiryJAXRS.
189          */
190         @Test(expected = WebApplicationException.class)
191         public void testGetBusinessDetailXML_NULL() {
192                 System.out.println("testGetBusinessDetailXML_NULL");
193 
194 
195                 String id = UUID.randomUUID().toString();
196                 BusinessEntity expResult = null;
197                 BusinessEntity result = instance.getBusinessDetailXML(id);
198 
199         }
200 
201         @Test
202         public void testGetBusinessDetailXML() {
203                 System.out.println("testGetBusinessDetailXML");
204 
205 
206                 String id = UUID.randomUUID().toString();
207                 BusinessEntity expResult = null;
208                 BusinessEntity result = instance.getBusinessDetailXML(JUDDI_BIZ);
209                 Assert.assertNotNull(result);
210                 Assert.assertNotNull(result.getBusinessKey());
211                 Assert.assertFalse(result.getName().isEmpty());
212 
213         }
214 
215         /**
216          * Test of getTModelDetailXML method, of class UDDIInquiryJAXRS.
217          */
218         @Test
219         public void testGetTModelDetailXML() {
220                 System.out.println("testGetTModelDetailXML");
221 
222                 TModel result = instance.getTModelDetailXML(JUDDI_TMODEL);
223                 Assert.assertNotNull(result);
224                 Assert.assertNotNull(result.getName());
225                 Assert.assertNotNull(result.getTModelKey());
226 
227         }
228 
229         /**
230          * Test of getTModelDetailJSON method, of class UDDIInquiryJAXRS.
231          */
232         @Test(expected = WebApplicationException.class)
233         public void testGetTModelDetailJSON_NULL() {
234                 System.out.println("getTModelDetailJSON_NULL");
235                 String id = UUID.randomUUID().toString();
236 
237                 TModel expResult = null;
238                 TModel result = instance.getTModelDetailJSON(id);
239 
240         }
241 
242         @Test
243         public void testGetTModelDetailJSON() {
244                 System.out.println("testGetTModelDetailJSON");
245 
246                 TModel result = instance.getTModelDetailJSON(JUDDI_TMODEL);
247                 Assert.assertNotNull(result);
248                 Assert.assertNotNull(result.getName());
249                 Assert.assertNotNull(result.getTModelKey());
250 
251         }
252 
253         /**
254          * Test of getServiceDetailJSON method, of class UDDIInquiryJAXRS.
255          */
256         @Test(expected = WebApplicationException.class)
257         public void testGetServiceDetailJSON_NULL() {
258                 System.out.println("getServiceDetailJSON_NULL");
259                 String id = UUID.randomUUID().toString();
260 
261                 BusinessService expResult = null;
262                 BusinessService result = instance.getServiceDetailJSON(id);
263 
264         }
265 
266         @Test
267         public void testGetServiceDetailJSON() {
268                 System.out.println("getServiceDetailJSON");
269                 String id = UUID.randomUUID().toString();
270 
271                 BusinessService expResult = null;
272                 BusinessService result = instance.getServiceDetailJSON(JUDDI_SVC);
273                 Assert.assertNotNull(result);
274                 Assert.assertNotNull(result.getBusinessKey());
275                 Assert.assertNotNull(result.getBusinessKey());
276         }
277 
278         /**
279          * Test of getServiceDetailXML method, of class UDDIInquiryJAXRS.
280          */
281         @Test(expected = WebApplicationException.class)
282         public void testGetServiceDetailXML_NULL() {
283                 System.out.println("getServiceDetailXML_NULL");
284                 String id = UUID.randomUUID().toString();
285 
286                 BusinessService expResult = null;
287                 BusinessService result = instance.getServiceDetailXML(id);
288 
289         }
290 
291         @Test
292         public void testGetServiceDetailXML() {
293                 System.out.println("getServiceDetailXML");
294                 String id = UUID.randomUUID().toString();
295 
296                 BusinessService expResult = null;
297                 BusinessService result = instance.getServiceDetailXML(JUDDI_SVC);
298                 Assert.assertNotNull(result);
299                 Assert.assertNotNull(result.getBusinessKey());
300                 Assert.assertNotNull(result.getBusinessKey());
301         }
302 
303         /**
304          * Test of getOpInfoJSON method, of class UDDIInquiryJAXRS.
305          */
306         @Test(expected = WebApplicationException.class)
307         public void testGetOpInfoJSON_NULL() {
308                 System.out.println("getOpInfoJSON_NULL");
309                 String id = UUID.randomUUID().toString();
310 
311                 OperationalInfo expResult = null;
312                 OperationalInfo result = instance.getOpInfoJSON(id);
313 
314         }
315 
316         @Test
317         public void testGetOpInfoJSON() {
318                 System.out.println("getOpInfoJSON");
319                 String id = UUID.randomUUID().toString();
320 
321                 OperationalInfo expResult = null;
322                 OperationalInfo result = instance.getOpInfoJSON(JUDDI_BIZ);
323                 Assert.assertNotNull(result);
324                 Assert.assertNotNull(result.getAuthorizedName());
325                 Assert.assertNotNull(result.getEntityKey());
326                 Assert.assertNotNull(result.getNodeID());
327 
328         }
329 
330         /**
331          * Test of getOpInfoXML method, of class UDDIInquiryJAXRS.
332          */
333         @Test(expected = WebApplicationException.class)
334         public void testGetOpInfoXML_NULL() {
335                 System.out.println("getOpInfoXML_NULL");
336                 String id = UUID.randomUUID().toString();
337 
338                 OperationalInfo expResult = null;
339                 OperationalInfo result = instance.getOpInfoXML(id);
340 
341         }
342 
343         @Test
344         public void testGetOpInfoXML() {
345                 System.out.println("getOpInfoXML");
346                 String id = UUID.randomUUID().toString();
347 
348                 OperationalInfo expResult = null;
349                 OperationalInfo result = instance.getOpInfoXML(JUDDI_BIZ);
350                 Assert.assertNotNull(result);
351                 Assert.assertNotNull(result.getAuthorizedName());
352                 Assert.assertNotNull(result.getEntityKey());
353                 Assert.assertNotNull(result.getNodeID());
354 
355         }
356 
357         /**
358          * Test of getBindingDetailJSON method, of class UDDIInquiryJAXRS.
359          */
360         @Test(expected = WebApplicationException.class)
361         public void testGetBindingDetailJSON_NULL() {
362                 System.out.println("getBindingDetailJSON_NULL");
363                 String id = UUID.randomUUID().toString();
364 
365                 BindingTemplate expResult = null;
366                 BindingTemplate result = instance.getBindingDetailJSON(id);
367 
368         }
369 
370         @Test
371         public void testGetBindingDetailJSON() {
372                 System.out.println("getBindingDetailJSON");
373                 String id = UUID.randomUUID().toString();
374 
375                 BindingTemplate expResult = null;
376                 BindingTemplate result = instance.getBindingDetailJSON(JUDDI_BT);
377                 Assert.assertNotNull(result);
378                 Assert.assertNotNull(result.getAccessPoint());
379                 Assert.assertNotNull(result.getBindingKey());
380                 Assert.assertNotNull(result.getServiceKey());
381 
382         }
383 
384         /**
385          * Test of getBindingDetailXML method, of class UDDIInquiryJAXRS.
386          */
387         @Test(expected = WebApplicationException.class)
388         public void testGetBindingDetailXML_NULL() {
389                 System.out.println("getBindingDetailXML_NULL");
390                 String id = UUID.randomUUID().toString();
391 
392                 BindingTemplate expResult = null;
393                 BindingTemplate result = instance.getBindingDetailXML(id);
394 
395         }
396 
397         @Test
398         public void testGetBindingDetailXML() {
399                 System.out.println("getBindingDetailXML");
400                 String id = UUID.randomUUID().toString();
401 
402                 BindingTemplate expResult = null;
403                 BindingTemplate result = instance.getBindingDetailXML(JUDDI_BT);
404                 Assert.assertNotNull(result);
405                 Assert.assertNotNull(result.getAccessPoint());
406                 Assert.assertNotNull(result.getBindingKey());
407                 Assert.assertNotNull(result.getServiceKey());
408 
409         }
410 
411         /**
412          * Test of geEndpointsByServiceJSON method, of class UDDIInquiryJAXRS.
413          */
414         @Test(expected = WebApplicationException.class)
415         public void testGeEndpointsByServiceJSON_NULL() {
416                 System.out.println("geEndpointsByServiceJSON_NULL");
417                 String id = UUID.randomUUID().toString();
418 
419                 UriContainer expResult = null;
420                 UriContainer result = instance.geEndpointsByServiceJSON(id);
421 
422         }
423 
424         @Test
425         public void testGeEndpointsByServiceJSON() {
426                 System.out.println("geEndpointsByServiceJSON");
427                 String id = UUID.randomUUID().toString();
428 
429                 UriContainer expResult = null;
430                 UriContainer result = instance.geEndpointsByServiceJSON(JUDDI_SVC);
431                 Assert.assertNotNull(result);
432 
433 
434         }
435 
436         @Test(expected = WebApplicationException.class)
437         public void testGetEndpointsByServiceXML_NULL() {
438                 System.out.println("getEndpointsByServiceXML_NULL");
439                 String id = UUID.randomUUID().toString();
440 
441                 UriContainer expResult = null;
442                 UriContainer result = instance.getEndpointsByServiceXML(id);
443 
444         }
445 
446         @Test
447         public void testGeTEndpointsByServiceXML() {
448                 System.out.println("geEndpointsByServiceXML");
449                 String id = UUID.randomUUID().toString();
450 
451                 UriContainer expResult = null;
452                 UriContainer result = instance.getEndpointsByServiceXML(JUDDI_SVC);
453                 Assert.assertNotNull(result);
454         }
455 
456         @Test
457         public void testgetServiceListXML() {
458                 System.out.println("getServiceListXML");
459                 String id = UUID.randomUUID().toString();
460 
461                 UriContainer expResult = null;
462                 KeyBag serviceListXML = instance.getServiceListXML();
463                 Assert.assertNotNull(serviceListXML);
464                 Assert.assertFalse(serviceListXML.getServiceKey().isEmpty());
465         }
466 
467         @Test
468         public void testgetServiceListJSON() {
469                 System.out.println("getServiceListJSON");
470                 String id = UUID.randomUUID().toString();
471 
472                 UriContainer expResult = null;
473                 KeyBag serviceListXML = instance.getServiceListJSON();
474                 Assert.assertNotNull(serviceListXML);
475                 Assert.assertFalse(serviceListXML.getServiceKey().isEmpty());
476         }
477 
478         @Test
479         public void testgetBusinessListXML() {
480                 System.out.println("testgetBusinessListXML");
481                 String id = UUID.randomUUID().toString();
482 
483                 UriContainer expResult = null;
484                 KeyBag serviceListXML = instance.getBusinessListXML();
485                 Assert.assertNotNull(serviceListXML);
486                 Assert.assertFalse(serviceListXML.getBusinessKey().isEmpty());
487         }
488 
489         @Test
490         public void testgetBusinessListJSON() {
491                 System.out.println("testgetBusinessListJSON");
492                 String id = UUID.randomUUID().toString();
493 
494                 UriContainer expResult = null;
495                 KeyBag serviceListXML = instance.getBusinessListJSON();
496                 Assert.assertNotNull(serviceListXML);
497                 Assert.assertFalse(serviceListXML.getBusinessKey().isEmpty());
498         }
499 
500         @Test
501         public void testgetTModelListXML() {
502                 System.out.println("testgetTModelListXML");
503                 String id = UUID.randomUUID().toString();
504 
505                 UriContainer expResult = null;
506                 KeyBag serviceListXML = instance.getTModelListXML();
507                 Assert.assertNotNull(serviceListXML);
508                 Assert.assertFalse(serviceListXML.getTModelKey().isEmpty());
509         }
510 
511         @Test
512         public void testgetTModelListJSON() {
513                 System.out.println("testgetTModelListJSON");
514                 String id = UUID.randomUUID().toString();
515 
516                 UriContainer expResult = null;
517                 KeyBag serviceListXML = instance.getTModelListJSON();
518                 Assert.assertNotNull(serviceListXML);
519                 Assert.assertFalse(serviceListXML.getTModelKey().isEmpty());
520         }
521 
522         @Test(expected = WebApplicationException.class)
523         public void testgetDetailXMLNULL() {
524                 System.out.println("testgetDetailXMLNULL");
525                 String id = UUID.randomUUID().toString();
526 
527                 UriContainer expResult = null;
528                 Object output = instance.getDetailXML(null, null, null, null);
529                 Assert.assertNotNull(output);
530                 //Assert.assertFalse(serviceListXML.getTModelKey().isEmpty());
531         }
532 
533         @Test(expected = WebApplicationException.class)
534         public void testgetDetailJSONNULL() {
535                 System.out.println("testgetDetailJSONNULL");
536                 String id = UUID.randomUUID().toString();
537 
538                 UriContainer expResult = null;
539                 Object output = instance.getDetailJSON(null, null, null, null);
540                 Assert.assertNotNull(output);
541                 //Assert.assertFalse(serviceListXML.getTModelKey().isEmpty());
542         }
543 
544         @Test(expected = WebApplicationException.class)
545         public void testgetDetailJSON_Random() {
546                 System.out.println("testgetDetailJSON_Random");
547                 String id = UUID.randomUUID().toString();
548 
549                 UriContainer expResult = null;
550                 Object output = instance.getDetailJSON(id, null, null, null);
551                 Assert.assertNotNull(output);
552                 //Assert.assertFalse(serviceListXML.getTModelKey().isEmpty());
553         }
554 
555         @Test(expected = WebApplicationException.class)
556         public void testgetDetailXML_Random() {
557                 System.out.println("testgetDetailXML_Random");
558                 String id = UUID.randomUUID().toString();
559 
560                 UriContainer expResult = null;
561                 Object output = instance.getDetailXML(id, null, null, null);
562                 Assert.assertNotNull(output);
563                 //Assert.assertFalse(serviceListXML.getTModelKey().isEmpty());
564         }
565 /*
566  * These tests are valid, but fail when ran as a unit test. cause unknown
567         @Test
568         public void testgetDetailJSON_SVC() {
569                 System.out.println("testgetDetailJSON_SVC");
570                 String id = UUID.randomUUID().toString();
571 
572                 UriContainer expResult = null;
573                 BusinessService output = (BusinessService) instance.getDetailJSON(JUDDI_SVC, null, null, null);
574                 Assert.assertNotNull(output);
575                 Assert.assertNotNull(output.getBusinessKey());
576                 Assert.assertNotNull(output.getServiceKey());
577         }
578 
579         @Test
580         public void testgetDetailXML_SVC() {
581                 System.out.println("testgetDetailXML_SVC");
582                 String id = UUID.randomUUID().toString();
583 
584                 UriContainer expResult = null;
585                 BusinessService output = (BusinessService) instance.getDetailXML(JUDDI_SVC, null, null, null);
586                 Assert.assertNotNull(output);
587                 Assert.assertNotNull(output.getBusinessKey());
588                 Assert.assertNotNull(output.getServiceKey());
589         }
590 
591         @Test
592         public void testgetDetailJSON_BIZ() {
593                 System.out.println("testgetDetailJSON_BIZ");
594                 String id = UUID.randomUUID().toString();
595 
596                 UriContainer expResult = null;
597                 BusinessEntity output = (BusinessEntity) instance.getDetailJSON(null, JUDDI_BIZ, null, null);
598                 Assert.assertNotNull(output);
599                 Assert.assertNotNull(output.getBusinessKey());
600 
601         }
602 
603         @Test
604         public void testgetDetailXML_BIZ() {
605                 System.out.println("testgetDetailXML_BIZ");
606                 String id = UUID.randomUUID().toString();
607 
608                 UriContainer expResult = null;
609                 BusinessEntity output = (BusinessEntity) instance.getDetailXML(null, JUDDI_BIZ, null, null);
610                 Assert.assertNotNull(output);
611                 Assert.assertNotNull(output.getBusinessKey());
612         }
613 
614         @Test
615         public void testgetDetailJSON_TM() {
616                 System.out.println("testgetDetailJSON_TM");
617                 String id = UUID.randomUUID().toString();
618 
619                 UriContainer expResult = null;
620                 TModel output = (TModel) instance.getDetailJSON(null, null, JUDDI_TMODEL, null);
621                 Assert.assertNotNull(output);
622                 Assert.assertNotNull(output.getTModelKey());
623 
624         }
625 
626         @Test
627         public void testgetDetailXML_TM() {
628                 System.out.println("testgetDetailXML_TM");
629                 String id = UUID.randomUUID().toString();
630 
631                 UriContainer expResult = null;
632                 TModel output = (TModel) instance.getDetailXML(null, null, JUDDI_TMODEL, null);
633                 Assert.assertNotNull(output);
634                 Assert.assertNotNull(output.getTModelKey());
635         }
636         
637         
638         @Test
639         public void testgetDetailJSON_BT() {
640                 System.out.println("testgetDetailJSON_BT");
641                 String id = UUID.randomUUID().toString();
642 
643                 UriContainer expResult = null;
644                 TModel output = (TModel) instance.getDetailJSON(null, null, null, JUDDI_BT);
645                 Assert.assertNotNull(output);
646                 Assert.assertNotNull(output.getTModelKey());
647 
648         }
649 
650         @Test
651         public void testgetDetailXML_BT() {
652                 System.out.println("testgetDetailXML_BT");
653                 String id = UUID.randomUUID().toString();
654 
655                 UriContainer expResult = null;
656                 TModel output = (TModel) instance.getDetailXML(null, null, null, JUDDI_BT);
657                 Assert.assertNotNull(output);
658                 Assert.assertNotNull(output.getTModelKey());
659         }
660         
661         @Test(expected = WebApplicationException.class)
662         public void testgetDetailJSON_ALL() {
663                 System.out.println("testgetDetailJSON_ALL");
664                 String id = UUID.randomUUID().toString();
665 
666                 UriContainer expResult = null;
667                 instance.getDetailJSON(JUDDI_BIZ, JUDDI_SVC, JUDDI_TMODEL, JUDDI_BT);
668                 Assert.fail();
669         }
670         @Test(expected = WebApplicationException.class)
671         public void testgetDetailXML_ALL() {
672                 System.out.println("testgetDetailXML_ALL");
673                 String id = UUID.randomUUID().toString();
674 
675                 UriContainer expResult = null;
676                 instance.getDetailXML(JUDDI_BIZ, JUDDI_SVC, JUDDI_TMODEL, JUDDI_BT);
677                 Assert.fail();
678                 
679         }*/
680 }