]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
2d0025aeed4852019fb82f53edb85c23828bf04b
[tmp/jakarta-migration.git] /
1 /**
2  * This document is a part of the source code and related artifacts
3  * for CollectionSpace, an open source collections management system
4  * for museums and related institutions:
5  *
6  * http://www.collectionspace.org
7  * http://wiki.collectionspace.org
8  *
9  * Copyright © 2009 Regents of the University of California
10  *
11  * Licensed under the Educational Community License (ECL), Version 2.0.
12  * You may not use this file except in compliance with this License.
13  *
14  * You may obtain a copy of the ECL 2.0 License at
15  * https://source.collectionspace.org/collection-space/LICENSE.txt
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 package org.collectionspace.services.client.test;
24
25 import java.util.List;
26 import javax.ws.rs.core.MediaType;
27 import javax.ws.rs.core.Response;
28
29 import org.collectionspace.services.client.AbstractCommonListUtils;
30 import org.collectionspace.services.client.CollectionSpaceClient;
31 import org.collectionspace.services.client.ContactClient;
32 import org.collectionspace.services.client.ContactClientUtils;
33 import org.collectionspace.services.client.PayloadOutputPart;
34 import org.collectionspace.services.client.PoxPayloadIn;
35 import org.collectionspace.services.client.PoxPayloadOut;
36 import org.collectionspace.services.contact.AddressGroup;
37 import org.collectionspace.services.contact.AddressGroupList;
38 import org.collectionspace.services.contact.ContactsCommon;
39 import org.collectionspace.services.contact.EmailGroup;
40 import org.collectionspace.services.contact.EmailGroupList;
41 import org.collectionspace.services.jaxb.AbstractCommonList;
42
43 import org.jboss.resteasy.client.ClientResponse;
44
45 import org.testng.Assert;
46
47 import org.slf4j.Logger;
48 import org.slf4j.LoggerFactory;
49
50 /**
51  * ContactServiceTest, carries out tests against a
52  * deployed and running Contact Service.
53  *
54  * $LastChangedRevision: 917 $
55  * $LastChangedDate: 2009-11-06 12:20:28 -0800 (Fri, 06 Nov 2009) $
56  */
57 public class ContactServiceTest extends AbstractPoxServiceTestImpl<AbstractCommonList, ContactsCommon> {
58
59     private final String CLASS_NAME = ContactServiceTest.class.getName();
60     private final Logger logger = LoggerFactory.getLogger(ContactServiceTest.class);
61     // Instance variables specific to this test.
62 //    final String SERVICE_PATH_COMPONENT = "contacts";
63
64     @Override
65     public String getServicePathComponent() {
66         return ContactClient.SERVICE_PATH_COMPONENT;
67     }
68
69     @Override
70     protected String getServiceName() {
71         return ContactClient.SERVICE_NAME;
72     }
73
74     /* (non-Javadoc)
75      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
76      */
77     @Override
78     protected CollectionSpaceClient getClientInstance() {
79         return new ContactClient();
80     }
81
82     /* (non-Javadoc)
83      * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
84      */
85     @Override
86     protected AbstractCommonList getCommonList(
87             ClientResponse<AbstractCommonList> response) {
88         return response.getEntity(AbstractCommonList.class);
89     }
90
91 //    @Override
92 //    protected PoxPayloadOut createInstance(String identifier) {
93 //      ContactClient client = new ContactClient();
94 //        PoxPayloadOut multipart =
95 //            ContactClientUtils.createContactInstance(identifier, client.getCommonPartName());
96 //        return multipart;
97 //    }
98     // ---------------------------------------------------------------
99     // CRUD tests : CREATE tests
100     // ---------------------------------------------------------------
101     // Success outcomes
102     
103     @Override
104 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
105     public void create(String testName) throws Exception {
106         // Perform setup, such as initializing the type of service request
107         // (e.g. CREATE, DELETE), its valid and expected status codes, and
108         // its associated HTTP method name (e.g. POST, DELETE).
109         setupCreate();
110
111         // Submit the request to the service and store the response.
112         ContactClient client = new ContactClient();
113         String identifier = createIdentifier();
114         PoxPayloadOut multipart =
115                 ContactClientUtils.createContactInstance(identifier, client.getCommonPartName());
116         ClientResponse<Response> res = client.create(multipart);
117
118         int statusCode = res.getStatus();
119
120         // Check the status code of the response: does it match
121         // the expected response(s)?
122         //
123         // Specifically:
124         // Does it fall within the set of valid status codes?
125         // Does it exactly match the expected status code?
126         if (logger.isDebugEnabled()) {
127             logger.debug(testName + ": status = " + statusCode);
128         }
129         Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
130                 invalidStatusCodeMessage(testRequestType, statusCode));
131         Assert.assertEquals(statusCode, testExpectedStatusCode);
132
133         // Store the ID returned from the first resource created
134         // for additional tests below.
135         if (knownResourceId == null) {
136             knownResourceId = extractId(res);
137             if (logger.isDebugEnabled()) {
138                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
139             }
140         }
141
142         // Store the IDs from every resource created by tests,
143         // so they can be deleted after tests have been run.
144         allResourceIdsCreated.add(extractId(res));
145     }
146
147     @Override
148 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
149 //    dependsOnMethods = {"create"})
150     public void createList(String testName) throws Exception {
151         for (int i = 0; i < 3; i++) {
152             create(testName);
153         }
154     }
155
156     // Failure outcomes
157     // Placeholders until the three tests below can be uncommented.
158     // See Issue CSPACE-401.
159     @Override
160     public void createWithEmptyEntityBody(String testName) throws Exception {
161         //Should this really be empty?
162     }
163
164     @Override
165     public void createWithMalformedXml(String testName) throws Exception {
166         //Should this really be empty??
167     }
168
169     @Override
170     public void createWithWrongXmlSchema(String testName) throws Exception {
171         //Should this really be empty??
172     }
173
174     /*
175     @Override
176     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
177     dependsOnMethods = {"create", "testSubmitRequest"})
178     public void createWithEmptyEntityBody(String testName) throws Exception {
179     
180     if (logger.isDebugEnabled()) {
181     logger.debug(testBanner(testName, CLASS_NAME));
182     }
183     // Perform setup.
184     setupCreateWithEmptyEntityBody(testName, logger);
185     
186     // Submit the request to the service and store the response.
187     String method = REQUEST_TYPE.httpMethodName();
188     String url = getServiceRootURL();
189     String mediaType = MediaType.APPLICATION_XML;
190     final String entity = "";
191     int statusCode = submitRequest(method, url, mediaType, entity);
192     
193     // Check the status code of the response: does it match
194     // the expected response(s)?
195     if(logger.isDebugEnabled()){
196     logger.debug("createWithEmptyEntityBody url=" + url +
197     " status=" + statusCode);
198     }
199     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
200     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
201     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
202     }
203     
204     @Override
205     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
206     dependsOnMethods = {"create", "testSubmitRequest"})
207     public void createWithMalformedXml(String testName) throws Exception {
208     
209     if (logger.isDebugEnabled()) {
210     logger.debug(testBanner(testName, CLASS_NAME));
211     }
212     // Perform setup.
213     setupCreateWithMalformedXml();
214     
215     // Submit the request to the service and store the response.
216     String method = REQUEST_TYPE.httpMethodName();
217     String url = getServiceRootURL();
218     String mediaType = MediaType.APPLICATION_XML;
219     final String entity = MALFORMED_XML_DATA; // Constant from base class.
220     int statusCode = submitRequest(method, url, mediaType, entity);
221     
222     // Check the status code of the response: does it match
223     // the expected response(s)?
224     if(logger.isDebugEnabled()){
225     logger.debug(testName + ": url=" + url +
226     " status=" + statusCode);
227     }
228     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
229     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
230     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
231     }
232     
233     @Override
234     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
235     dependsOnMethods = {"create", "testSubmitRequest"})
236     public void createWithWrongXmlSchema(String testName) throws Exception {
237     
238     if (logger.isDebugEnabled()) {
239     logger.debug(testBanner(testName, CLASS_NAME));
240     }
241     // Perform setup.
242     setupCreateWithWrongXmlSchema(testName, logger);
243     
244     // Submit the request to the service and store the response.
245     String method = REQUEST_TYPE.httpMethodName();
246     String url = getServiceRootURL();
247     String mediaType = MediaType.APPLICATION_XML;
248     final String entity = WRONG_XML_SCHEMA_DATA;
249     int statusCode = submitRequest(method, url, mediaType, entity);
250     
251     // Check the status code of the response: does it match
252     // the expected response(s)?
253     if(logger.isDebugEnabled()){
254     logger.debug(testName + ": url=" + url +
255     " status=" + statusCode);
256     }
257     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
258     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
259     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
260     }
261      */
262     // ---------------------------------------------------------------
263     // CRUD tests : READ tests
264     // ---------------------------------------------------------------
265     // Success outcomes
266     @Override
267 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
268 //    dependsOnMethods = {"create"})
269     public void read(String testName) throws Exception {
270         // Perform setup.
271         setupRead();
272
273         // Submit the request to the service and store the response.
274         ContactClient client = new ContactClient();
275         ClientResponse<String> res = client.read(knownResourceId);
276         try {
277                 assertStatusCode(res, testName);
278                 PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
279                 ContactsCommon contact = (ContactsCommon) extractPart(input,
280                         client.getCommonPartName(), ContactsCommon.class);
281                 Assert.assertNotNull(contact);
282         } finally {
283                 if (res != null) {
284                 res.releaseConnection();
285             }
286         }
287     }
288
289     // ---------------------------------------------------------------
290     // CRUD tests : READ_LIST tests
291     // ---------------------------------------------------------------
292     // Success outcomes
293     @Override
294 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
295 //    dependsOnMethods = {"read"})
296     public void readList(String testName) throws Exception {
297         // Perform setup.
298         setupReadList();
299
300         // Submit the request to the service and store the response.
301         ContactClient client = new ContactClient();
302         ClientResponse<AbstractCommonList> res = client.readList();
303         try {
304                 assertStatusCode(res, testName);
305                 AbstractCommonList list = res.getEntity();
306         
307                 // Optionally output additional data about list members for debugging.
308                 boolean iterateThroughList = false;
309                 if (iterateThroughList && logger.isDebugEnabled()) {
310                     AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
311                 }
312         } finally {
313                 if (res != null) {
314                 res.releaseConnection();
315             }
316         }
317     }
318
319     // Failure outcomes
320     // None at present.
321     // ---------------------------------------------------------------
322     // CRUD tests : UPDATE tests
323     // ---------------------------------------------------------------
324     // Success outcomes
325     @Override
326 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
327 //    dependsOnMethods = {"read"})
328     public void update(String testName) throws Exception {
329         // Perform setup.
330         setupUpdate();
331         //
332         // First read the object that will be updated
333         //
334         ContactClient client = new ContactClient();
335         ClientResponse<String> res = client.read(knownResourceId);
336         ContactsCommon contact = null;
337         try {
338                 assertStatusCode(res, testName);
339                 
340                 if (logger.isDebugEnabled()) {
341                     logger.debug("got object to update with ID: " + knownResourceId);
342                 }
343                 PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
344                 contact = (ContactsCommon) extractPart(input,
345                         client.getCommonPartName(), ContactsCommon.class);
346                 Assert.assertNotNull(contact);
347         } finally {
348                 if (res != null) {
349                 res.releaseConnection();
350             }
351         }
352         
353         if(logger.isDebugEnabled()){
354             logger.debug("contact common before updating");
355             logger.debug(BaseServiceTest.objectAsXmlString(contact, ContactsCommon.class));
356         }
357
358         // Verify the contents of this resource
359         EmailGroupList emailGroupList = contact.getEmailGroupList();
360         Assert.assertNotNull(emailGroupList);
361         List<EmailGroup> emailGroups = emailGroupList.getEmailGroup();
362         Assert.assertNotNull(emailGroups);
363         Assert.assertTrue(emailGroups.size() > 0);
364         String email = emailGroups.get(0).getEmail();
365         Assert.assertNotNull(email);
366
367         AddressGroupList addressGroupList = contact.getAddressGroupList();
368         Assert.assertNotNull(addressGroupList);
369         List<AddressGroup> addressGroups = addressGroupList.getAddressGroup();
370         Assert.assertNotNull(addressGroups);
371         Assert.assertTrue(addressGroups.size() > 0);
372         String addressType = addressGroups.get(0).getAddressType();
373         String addressPlace1 = addressGroups.get(0).getAddressPlace1();
374         Assert.assertNotNull(addressType);
375         Assert.assertNotNull(addressPlace1);
376
377         // Update the contents of this resource.
378         emailGroups.get(0).setEmail("updated-" + email);
379         contact.setEmailGroupList(emailGroupList);
380
381         addressGroups.get(0).setAddressType("updated-" + addressType);
382         addressGroups.get(0).setAddressPlace1("updated-" + addressPlace1);
383         contact.setAddressGroupList(addressGroupList);
384
385         if (logger.isDebugEnabled()) {
386             logger.debug("to be updated object");
387             logger.debug(BaseServiceTest.objectAsXmlString(contact, ContactsCommon.class));
388         }
389         //
390         // Next, send the update to the server
391         //
392         PoxPayloadOut output = new PoxPayloadOut(ContactClient.SERVICE_PAYLOAD_NAME);
393         PayloadOutputPart commonPart = output.addPart(client.getCommonPartName(), contact);
394
395         res = client.update(knownResourceId, output);
396         ContactsCommon updatedContact = null;
397         try {
398                 assertStatusCode(res, testName);
399                 PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
400                 updatedContact = (ContactsCommon) extractPart(input,
401                         client.getCommonPartName(), ContactsCommon.class);
402                 Assert.assertNotNull(updatedContact);
403         } finally {
404                 if (res != null) {
405                 res.releaseConnection();
406             }
407         }
408         
409         if (logger.isDebugEnabled()) {
410             logger.debug("object after update");
411             logger.debug(objectAsXmlString(updatedContact, ContactsCommon.class));
412         }
413                 
414         Assert.assertNotNull(updatedContact.getEmailGroupList().getEmailGroup().get(0));
415         Assert.assertEquals(updatedContact.getEmailGroupList().getEmailGroup().get(0).getEmail(),
416                 contact.getEmailGroupList().getEmailGroup().get(0).getEmail(),
417                 "Data in updated object did not match submitted data.");
418
419     }
420
421     // Failure outcomes
422     // Placeholders until the three tests below can be uncommented.
423     // See Issue CSPACE-401.
424     @Override
425     public void updateWithEmptyEntityBody(String testName) throws Exception {
426         //Should this really be empty??
427     }
428
429     /* (non-Javadoc)
430      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithMalformedXml(java.lang.String)
431      */
432     @Override
433     public void updateWithMalformedXml(String testName) throws Exception {
434         //Should this really be empty??
435     }
436
437     @Override
438     public void updateWithWrongXmlSchema(String testName) throws Exception {
439         //Should this really be empty??
440     }
441
442     /*
443     @Override
444     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
445     dependsOnMethods = {"create", "update", "testSubmitRequest"})
446     public void updateWithEmptyEntityBody(String testName) throws Exception {
447     
448     if (logger.isDebugEnabled()) {
449     logger.debug(testBanner(testName, CLASS_NAME));
450     }
451     // Perform setup.
452     setupUpdateWithEmptyEntityBody();
453     
454     // Submit the request to the service and store the response.
455     String method = REQUEST_TYPE.httpMethodName();
456     String url = getResourceURL(knownResourceId);
457     String mediaType = MediaType.APPLICATION_XML;
458     final String entity = "";
459     int statusCode = submitRequest(method, url, mediaType, entity);
460     
461     // Check the status code of the response: does it match
462     // the expected response(s)?
463     if(logger.isDebugEnabled()){
464     logger.debug(testName + ": url=" + url +
465     " status=" + statusCode);
466     }
467     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
468     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
469     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
470     }
471     
472     @Override
473     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
474     dependsOnMethods = {"create", "update", "testSubmitRequest"})
475     public void updateWithMalformedXml(String testName) throws Exception {
476     
477     if (logger.isDebugEnabled()) {
478     logger.debug(testBanner(testName, CLASS_NAME));
479     }
480     // Perform setup.
481     setupUpdateWithMalformedXml();
482     
483     // Submit the request to the service and store the response.
484     String method = REQUEST_TYPE.httpMethodName();
485     String url = getResourceURL(knownResourceId);
486     String mediaType = MediaType.APPLICATION_XML;
487     final String entity = MALFORMED_XML_DATA;
488     int statusCode = submitRequest(method, url, mediaType, entity);
489     
490     // Check the status code of the response: does it match
491     // the expected response(s)?
492     if(logger.isDebugEnabled()){
493     logger.debug(testName + ": url=" + url +
494     " status=" + statusCode);
495     }
496     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
497     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
498     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
499     }
500     
501     @Override
502     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
503     dependsOnMethods = {"create", "update", "testSubmitRequest"})
504     public void updateWithWrongXmlSchema(String testName) throws Exception {
505     
506     if (logger.isDebugEnabled()) {
507     logger.debug(testBanner(testName, CLASS_NAME));
508     }
509     // Perform setup.
510     setupUpdateWithWrongXmlSchema(testName, logger);
511     
512     // Submit the request to the service and store the response.
513     String method = REQUEST_TYPE.httpMethodName();
514     String url = getResourceURL(knownResourceId);
515     String mediaType = MediaType.APPLICATION_XML;
516     final String entity = WRONG_XML_SCHEMA_DATA;
517     int statusCode = submitRequest(method, url, mediaType, entity);
518     
519     // Check the status code of the response: does it match
520     // the expected response(s)?
521     if(logger.isDebugEnabled()){
522     logger.debug(testName + ": url=" + url +
523     " status=" + statusCode);
524     }
525     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
526     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
527     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
528     }
529      */
530     @Override
531 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
532 //    dependsOnMethods = {"update", "testSubmitRequest"})
533     public void updateNonExistent(String testName) throws Exception {
534         // Perform setup.
535         setupUpdateNonExistent();
536
537         // Submit the request to the service and store the response.
538         // Note: The ID used in this 'create' call may be arbitrary.
539         // The only relevant ID may be the one used in update(), below.
540         ContactClient client = new ContactClient();
541         PoxPayloadOut multipart =
542                 ContactClientUtils.createContactInstance(NON_EXISTENT_ID, client.getCommonPartName());
543         ClientResponse<String> res =
544                 client.update(NON_EXISTENT_ID, multipart);
545         int statusCode = res.getStatus();
546
547         // Check the status code of the response: does it match
548         // the expected response(s)?
549         if (logger.isDebugEnabled()) {
550             logger.debug(testName + ": status = " + statusCode);
551         }
552         Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
553                 invalidStatusCodeMessage(testRequestType, statusCode));
554         Assert.assertEquals(statusCode, testExpectedStatusCode);
555     }
556
557     // ---------------------------------------------------------------
558     // CRUD tests : DELETE tests
559     // ---------------------------------------------------------------
560     // Success outcomes
561     @Override
562 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
563 //    dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
564     public void delete(String testName) throws Exception {
565         // Perform setup.
566         setupDelete();
567
568         // Submit the request to the service and store the response.
569         ContactClient client = new ContactClient();
570         ClientResponse<Response> res = client.delete(knownResourceId);
571         int statusCode = res.getStatus();
572
573         // Check the status code of the response: does it match
574         // the expected response(s)?
575         if (logger.isDebugEnabled()) {
576             logger.debug(testName + ": status = " + statusCode);
577         }
578         Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
579                 invalidStatusCodeMessage(testRequestType, statusCode));
580         Assert.assertEquals(statusCode, testExpectedStatusCode);
581     }
582
583     // Failure outcomes
584     @Override
585 //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
586 //    dependsOnMethods = {"delete"})
587     public void deleteNonExistent(String testName) throws Exception {
588         // Perform setup.
589         setupDeleteNonExistent();
590
591         // Submit the request to the service and store the response.
592         ContactClient client = new ContactClient();
593         ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
594         int statusCode = res.getStatus();
595
596         // Check the status code of the response: does it match
597         // the expected response(s)?
598         if (logger.isDebugEnabled()) {
599             logger.debug(testName + ": status = " + statusCode);
600         }
601         Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
602                 invalidStatusCodeMessage(testRequestType, statusCode));
603         Assert.assertEquals(statusCode, testExpectedStatusCode);
604     }
605
606     // ---------------------------------------------------------------
607     // Utility tests : tests of code used in tests above
608     // ---------------------------------------------------------------
609     /**
610      * Tests the code for manually submitting data that is used by several
611      * of the methods above.
612      */
613 //    @Test(dependsOnMethods = {"create", "read"})
614     public void testSubmitRequest() {
615
616         // Expected status code: 200 OK
617         final int EXPECTED_STATUS = Response.Status.OK.getStatusCode();
618
619         // Submit the request to the service and store the response.
620         String method = ServiceRequestType.READ.httpMethodName();
621         String url = getResourceURL(knownResourceId);
622         int statusCode = submitRequest(method, url);
623
624         // Check the status code of the response: does it match
625         // the expected response(s)?
626         if (logger.isDebugEnabled()) {
627             logger.debug("testSubmitRequest: url=" + url
628                     + " status=" + statusCode);
629         }
630         Assert.assertEquals(statusCode, EXPECTED_STATUS);
631     }
632     
633     @Override
634     public void readWorkflow(String testName) throws Exception {
635         // Not applicable for the Contact service
636     }
637     
638     @Override
639     public void searchWorkflowDeleted(String testName) throws Exception {
640         // Not applicable for the Contact service
641     }
642
643         @Override
644         protected PoxPayloadOut createInstance(String commonPartName,
645                         String identifier) {
646                 return ContactClientUtils.createContactInstance(identifier, commonPartName);
647         }
648
649         @Override
650         protected ContactsCommon updateInstance(ContactsCommon commonPartObject) {
651                 // TODO Auto-generated method stub
652                 return null;
653         }
654
655         @Override
656         protected void compareUpdatedInstances(ContactsCommon original,
657                         ContactsCommon updated) throws Exception {
658                 // TODO Auto-generated method stub
659                 
660         }
661         
662         @Override
663         public void CRUDTests(String testName) {
664                 // TODO Auto-generated method stub              
665         }
666 }