]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
f9251bd492896898ec9becd725bb0bd68636c733
[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 org.collectionspace.services.client.AbstractCommonListUtils;
26 import org.collectionspace.services.client.CollectionSpaceClient;
27 import org.collectionspace.services.client.ValuationcontrolClient;
28 import org.collectionspace.services.client.PayloadInputPart;
29 import org.collectionspace.services.client.PayloadOutputPart;
30 import org.collectionspace.services.client.PoxPayloadIn;
31 import org.collectionspace.services.client.PoxPayloadOut;
32 import org.collectionspace.services.jaxb.AbstractCommonList;
33 import org.collectionspace.services.valuationcontrol.ValuationcontrolsCommon;
34
35 import javax.ws.rs.core.Response;
36 import org.testng.Assert;
37 import org.slf4j.Logger;
38 import org.slf4j.LoggerFactory;
39
40 /**
41  * ValuationcontrolServiceTest, carries out tests against a
42  * deployed and running Valuationcontrol Service.
43  */
44 public class ValuationcontrolServiceTest extends AbstractPoxServiceTestImpl<AbstractCommonList, ValuationcontrolsCommon> {
45
46     /** The logger. */
47     private final String CLASS_NAME = ValuationcontrolServiceTest.class.getName();
48     private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
49     // Instance variables specific to this test.
50     /** The service path component. */
51     final String SERVICE_NAME = "valuationcontrols";
52     final String SERVICE_PATH_COMPONENT = "valuationcontrols";
53
54     @Override
55     protected CollectionSpaceClient getClientInstance() {
56         return new ValuationcontrolClient();
57     }
58
59         @Override
60         protected CollectionSpaceClient getClientInstance(String clientPropertiesFilename) {
61         return new ValuationcontrolClient(clientPropertiesFilename);
62         }
63         
64     /* (non-Javadoc)
65      * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
66      */
67     @Override
68     protected AbstractCommonList getCommonList(Response response) {
69         return response.readEntity(AbstractCommonList.class);
70     }
71
72     // ---------------------------------------------------------------
73     // CRUD tests : CREATE tests
74     // ---------------------------------------------------------------
75     
76     // Success outcomes
77     
78     /* (non-Javadoc)
79      * @see org.collectionspace.services.client.test.ServiceTest#create(java.lang.String)
80      */
81     @Override
82     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
83     public void create(String testName) throws Exception {
84         // Perform setup, such as initializing the type of service request
85         // (e.g. CREATE, DELETE), its valid and expected status codes, and
86         // its associated HTTP method name (e.g. POST, DELETE).
87         setupCreate();
88
89         // Submit the request to the service and store the response.
90         ValuationcontrolClient client = new ValuationcontrolClient();
91         String identifier = createIdentifier();
92         PoxPayloadOut multipart = createValuationcontrolInstance(identifier);
93         String newID = null;
94         Response res = client.create(multipart);
95         try {
96             int statusCode = res.getStatus();
97
98             // Check the status code of the response: does it match
99             // the expected response(s)?
100             //
101             // Specifically:
102             // Does it fall within the set of valid status codes?
103             // Does it exactly match the expected status code?
104             if (logger.isDebugEnabled()) {
105                 logger.debug(testName + ": status = " + statusCode);
106             }
107             Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
108                     invalidStatusCodeMessage(testRequestType, statusCode));
109             Assert.assertEquals(statusCode, testExpectedStatusCode);
110
111             newID = extractId(res);
112         } finally {
113             if (res != null) {
114                 res.close();
115             }
116         }
117
118         // Store the ID returned from the first resource created
119         // for additional tests below.
120         if (knownResourceId == null) {
121             knownResourceId = newID;
122             if (logger.isDebugEnabled()) {
123                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
124             }
125         }
126
127         // Store the IDs from every resource created by tests,
128         // so they can be deleted after tests have been run.
129         allResourceIdsCreated.add(newID);
130     }
131
132     /* (non-Javadoc)
133      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
134      */
135     @Override
136     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
137     //    dependsOnMethods = {"create"})
138     public void createList(String testName) throws Exception {
139         for (int i = 0; i < 3; i++) {
140             create(testName);
141         }
142     }
143
144
145     /*
146     @Override
147     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
148     dependsOnMethods = {"create", "testSubmitRequest"})
149     public void createWithEmptyEntityBody(String testName) throws Exception {
150     
151     if (logger.isDebugEnabled()) {
152     logger.debug(testBanner(testName, CLASS_NAME));
153     }
154     // Perform setup.
155     setupCreateWithEmptyEntityBody();
156     
157     // Submit the request to the service and store the response.
158     String method = REQUEST_TYPE.httpMethodName();
159     String url = getServiceRootURL();
160     String mediaType = MediaType.APPLICATION_XML;
161     final String entity = "";
162     int statusCode = submitRequest(method, url, mediaType, entity);
163     
164     // Check the status code of the response: does it match
165     // the expected response(s)?
166     if(logger.isDebugEnabled()){
167     logger.debug("createWithEmptyEntityBody url=" + url +
168     " status=" + statusCode);
169     }
170     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
171     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
172     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
173     }
174     
175     @Override
176     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
177     dependsOnMethods = {"create", "testSubmitRequest"})
178     public void createWithMalformedXml(String testName) throws Exception {
179     
180     if (logger.isDebugEnabled()) {
181     logger.debug(testBanner(testName, CLASS_NAME));
182     }
183     // Perform setup.
184     setupCreateWithMalformedXml(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 = MALFORMED_XML_DATA; // Constant from base class.
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(testName + ": 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 createWithWrongXmlSchema(String testName) throws Exception {
208     
209     if (logger.isDebugEnabled()) {
210     logger.debug(testBanner(testName, CLASS_NAME));
211     }
212     // Perform setup.
213     setupCreateWithWrongXmlSchema(testName, logger);
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 = WRONG_XML_SCHEMA_DATA;
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     
234     // ---------------------------------------------------------------
235     // CRUD tests : READ tests
236     // ---------------------------------------------------------------
237     
238     // Success outcomes
239     
240     /* (non-Javadoc)
241      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#read(java.lang.String)
242      */
243     @Override
244     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
245     //    dependsOnMethods = {"create"})
246     public void read(String testName) throws Exception {
247         // Perform setup.
248         setupRead();
249
250         // Submit the request to the service and store the response.
251         ValuationcontrolClient client = new ValuationcontrolClient();
252         Response res = client.read(knownResourceId);
253         PoxPayloadIn input = null;
254         try {
255             assertStatusCode(res, testName);
256             input = new PoxPayloadIn(res.readEntity(String.class));
257         } finally {
258             if (res != null) {
259                 res.close();
260             }
261         }
262
263         // Get the common part of the response and verify that it is not null.
264         PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName());
265         ValuationcontrolsCommon valuationcontrolCommon = null;
266         if (payloadInputPart != null) {
267             valuationcontrolCommon = (ValuationcontrolsCommon) payloadInputPart.getBody();
268         }
269         Assert.assertNotNull(valuationcontrolCommon);
270
271         // Check selected fields.
272
273         // Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters.
274         String valueNote = valuationcontrolCommon.getValueNote();
275
276         if (logger.isDebugEnabled()) {
277             logger.debug("UTF-8 data sent=" + getUTF8DataFragment() + "\n"
278                     + "UTF-8 data received=" + valueNote);
279         }
280
281         Assert.assertEquals(valueNote, getUTF8DataFragment(),
282                 "UTF-8 data retrieved '" + valueNote
283                 + "' does not match expected data '" + getUTF8DataFragment());
284     }
285
286     // Failure outcomes
287     
288     /* (non-Javadoc)
289      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readNonExistent(java.lang.String)
290      */
291     @Override
292     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
293     //    dependsOnMethods = {"read"})
294     public void readNonExistent(String testName) throws Exception {
295         // Perform setup.
296         setupReadNonExistent();
297
298         // Submit the request to the service and store the response.
299         ValuationcontrolClient client = new ValuationcontrolClient();
300         Response res = client.read(NON_EXISTENT_ID);
301         try {
302             int statusCode = res.getStatus();
303
304             // Check the status code of the response: does it match
305             // the expected response(s)?
306             if (logger.isDebugEnabled()) {
307                 logger.debug(testName + ": status = " + statusCode);
308             }
309             Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
310                     invalidStatusCodeMessage(testRequestType, statusCode));
311             Assert.assertEquals(statusCode, testExpectedStatusCode);
312         } finally {
313             if (res != null) {
314                 res.close();
315             }
316         }
317     }
318
319     // ---------------------------------------------------------------
320     // CRUD tests : READ_LIST tests
321     // ---------------------------------------------------------------
322     
323     // Success outcomes
324     
325     /* (non-Javadoc)
326      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readList(java.lang.String)
327      */
328     @Override
329     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
330     //    dependsOnMethods = {"createList", "read"})
331     public void readList(String testName) throws Exception {
332         // Perform setup.
333         setupReadList();
334
335         // Submit the request to the service and store the response.
336         AbstractCommonList list = null;
337         ValuationcontrolClient client = new ValuationcontrolClient();
338         Response res = client.readList();
339         assertStatusCode(res, testName);
340         try {
341             int statusCode = res.getStatus();
342
343             // Check the status code of the response: does it match
344             // the expected response(s)?
345             if (logger.isDebugEnabled()) {
346                 logger.debug(testName + ": status = " + statusCode);
347             }
348             Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
349                     invalidStatusCodeMessage(testRequestType, statusCode));
350             Assert.assertEquals(statusCode, testExpectedStatusCode);
351
352             list = res.readEntity(getCommonListType());
353         } finally {
354             if (res != null) {
355                 res.close();
356             }
357         }
358
359         // Optionally output additional data about list members for debugging.
360         boolean iterateThroughList = true;
361         if(iterateThroughList && logger.isDebugEnabled()){
362             AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
363         }
364
365     }
366
367     // Failure outcomes
368     // None at present.
369     
370     // ---------------------------------------------------------------
371     // CRUD tests : UPDATE tests
372     // ---------------------------------------------------------------
373     
374     // Success outcomes
375     
376     /* (non-Javadoc)
377      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#update(java.lang.String)
378      */
379     @Override
380     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
381     //    dependsOnMethods = {"read"})
382     public void update(String testName) throws Exception {
383         // Perform setup.
384         setupRead();
385
386         // Retrieve the contents of a resource to update.
387         ValuationcontrolClient client = new ValuationcontrolClient();
388         Response res = client.read(knownResourceId);
389         PoxPayloadIn input = null;
390         try {
391             assertStatusCode(res, testName);
392             input = new PoxPayloadIn(res.readEntity(String.class));
393             if (logger.isDebugEnabled()) {
394                 logger.debug("got object to update with ID: " + knownResourceId);
395             }
396         } finally {
397             if (res != null) {
398                 res.close();
399             }
400         }
401
402         // Extract the common part from the response.
403         PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName());
404         ValuationcontrolsCommon valuationcontrolCommon = null;
405         if (payloadInputPart != null) {
406             valuationcontrolCommon = (ValuationcontrolsCommon) payloadInputPart.getBody();
407         }
408         Assert.assertNotNull(valuationcontrolCommon);
409
410         // Update the content of this resource.
411         valuationcontrolCommon.setValuationcontrolRefNumber("updated-" + valuationcontrolCommon.getValuationcontrolRefNumber());
412
413         String valueNote = valuationcontrolCommon.getValueNote();
414         valuationcontrolCommon.setValueNote("updated-valueNote-" + valueNote);
415
416         if (logger.isDebugEnabled()) {
417             logger.debug("to be updated object");
418             logger.debug(objectAsXmlString(valuationcontrolCommon, ValuationcontrolsCommon.class));
419         }
420
421         setupUpdate();
422         
423         // Submit the updated common part in an update request to the service
424         // and store the response.
425         PoxPayloadOut output = new PoxPayloadOut(this.getServicePathComponent());
426         PayloadOutputPart commonPart = output.addPart(client.getCommonPartName(), valuationcontrolCommon);
427         res = client.update(knownResourceId, output);
428         try {
429             assertStatusCode(res, testName);
430             int statusCode = res.getStatus();
431             // Check the status code of the response: does it match the expected response(s)?
432             if (logger.isDebugEnabled()) {
433                 logger.debug(testName + ": status = " + statusCode);
434             }
435             Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
436                     invalidStatusCodeMessage(testRequestType, statusCode));
437             Assert.assertEquals(statusCode, testExpectedStatusCode);
438             input = new PoxPayloadIn(res.readEntity(String.class));
439         } finally {
440             if (res != null) {
441                 res.close();
442             }
443         }
444
445         // Extract the updated common part from the response.
446         payloadInputPart = input.getPart(client.getCommonPartName());
447         ValuationcontrolsCommon updatedValuationcontrolCommon = null;
448         if (payloadInputPart != null) {
449             updatedValuationcontrolCommon = (ValuationcontrolsCommon) payloadInputPart.getBody();
450         }
451         Assert.assertNotNull(updatedValuationcontrolCommon);
452
453         // Check selected fields in the updated common part.
454         Assert.assertEquals(updatedValuationcontrolCommon.getValuationcontrolRefNumber(),
455                 valuationcontrolCommon.getValuationcontrolRefNumber(),
456                 "Data in updated object did not match submitted data.");
457
458         // Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters.
459         String originalValueNote = valuationcontrolCommon.getValueNote();
460         String updatedValueNote = updatedValuationcontrolCommon.getValueNote();
461         
462         Assert.assertEquals(updatedValueNote, originalValueNote,
463                 "Data in updated object did not match submitted data.");
464
465         if(logger.isDebugEnabled()){
466             logger.debug("UTF-8 data sent=" + originalValueNote + "\n"
467                     + "UTF-8 data received=" + updatedValueNote);
468         }
469         Assert.assertTrue(updatedValueNote.contains(getUTF8DataFragment()),
470                 "UTF-8 data retrieved '" + updatedValueNote
471                 + "' does not match expected data '" + getUTF8DataFragment());
472     }
473
474     @Override
475     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
476     //    dependsOnMethods = {"update", "testSubmitRequest"})
477     public void updateNonExistent(String testName) throws Exception {
478         // Perform setup.
479         setupUpdateNonExistent();
480
481         // Submit the request to the service and store the response.
482         // Note: The ID used in this 'create' call may be arbitrary.
483         // The only relevant ID may be the one used in update(), below.
484         ValuationcontrolClient client = new ValuationcontrolClient();
485         PoxPayloadOut multipart = createValuationcontrolInstance(NON_EXISTENT_ID);
486         Response res = client.update(NON_EXISTENT_ID, multipart);
487         try {
488             int statusCode = res.getStatus();
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 + ": status = " + statusCode);
494             }
495             Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
496                     invalidStatusCodeMessage(testRequestType, statusCode));
497             Assert.assertEquals(statusCode, testExpectedStatusCode);
498         } finally {
499             if (res != null) {
500                 res.close();
501             }
502         }
503     }
504
505     // ---------------------------------------------------------------
506     // CRUD tests : DELETE tests
507     // ---------------------------------------------------------------
508     
509     // Success outcomes
510     
511     /* (non-Javadoc)
512      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String)
513      */
514     @Override
515     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
516     //    dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
517     public void delete(String testName) throws Exception {
518         // Perform setup.
519         setupDelete();
520
521         // Submit the request to the service and store the response.
522         ValuationcontrolClient client = new ValuationcontrolClient();
523         Response res = client.delete(knownResourceId);
524         try {
525             int statusCode = res.getStatus();
526
527             // Check the status code of the response: does it match
528             // the expected response(s)?
529             if (logger.isDebugEnabled()) {
530                 logger.debug(testName + ": status = " + statusCode);
531             }
532             Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
533                     invalidStatusCodeMessage(testRequestType, statusCode));
534             Assert.assertEquals(statusCode, testExpectedStatusCode);
535         } finally {
536             if (res != null) {
537                 res.close();
538             }
539         }
540     }
541
542     // Failure outcomes
543     
544     /* (non-Javadoc)
545      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)
546      */
547     @Override
548     //    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
549     //    dependsOnMethods = {"delete"})
550     public void deleteNonExistent(String testName) throws Exception {
551         // Perform setup.
552         setupDeleteNonExistent();
553
554         // Submit the request to the service and store the response.
555         ValuationcontrolClient client = new ValuationcontrolClient();
556         Response res = client.delete(NON_EXISTENT_ID);
557         try {
558             int statusCode = res.getStatus();
559
560             // Check the status code of the response: does it match
561             // the expected response(s)?
562             if (logger.isDebugEnabled()) {
563                 logger.debug(testName + ": status = " + statusCode);
564             }
565             Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
566                     invalidStatusCodeMessage(testRequestType, statusCode));
567             Assert.assertEquals(statusCode, testExpectedStatusCode);
568         } finally {
569             if (res != null) {
570                 res.close();
571             }
572         }
573     }
574
575     // ---------------------------------------------------------------
576     // Utility tests : tests of code used in tests above
577     // ---------------------------------------------------------------
578     
579     /**
580      * Tests the code for manually submitting data that is used by several
581      * of the methods above.
582      */
583     //    @Test(dependsOnMethods = {"create", "read"})
584     public void testSubmitRequest() {
585
586         // Expected status code: 200 OK
587         final int EXPECTED_STATUS = Response.Status.OK.getStatusCode();
588
589         // Submit the request to the service and store the response.
590         String method = ServiceRequestType.READ.httpMethodName();
591         String url = getResourceURL(knownResourceId);
592         int statusCode = submitRequest(method, url);
593
594         // Check the status code of the response: does it match
595         // the expected response(s)?
596         if (logger.isDebugEnabled()) {
597             logger.debug("testSubmitRequest: url=" + url
598                     + " status=" + statusCode);
599         }
600         Assert.assertEquals(statusCode, EXPECTED_STATUS);
601
602     }
603
604     // ---------------------------------------------------------------
605     // Utility methods used by tests above
606     // ---------------------------------------------------------------
607     
608     @Override
609     public String getServiceName() {
610         return SERVICE_NAME;
611     }
612
613     /* (non-Javadoc)
614      * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent()
615      */
616     @Override
617     public String getServicePathComponent() {
618         return SERVICE_PATH_COMPONENT;
619     }
620
621     @Override
622     protected PoxPayloadOut createInstance(String identifier) {
623         return createValuationcontrolInstance(identifier);
624     }
625
626     /**
627      * Creates the valuationcontrol instance.
628      *
629      * @param identifier the identifier
630      * @return the multipart output
631      */
632     //private PoxPayloadOut createValuationcontrolInstance(String identifier) {
633     //    return createValuationcontrolInstance("valuationcontrolRefNumber-" + identifier);
634     //}
635
636     /**
637      * Creates the valuationcontrol instance.
638      *
639      * @param valuationcontrolRefNumber the valuationcontrol number
640      * @return the multipart output
641      */
642     private PoxPayloadOut createValuationcontrolInstance(String valuationcontrolRefNumber) {
643
644         ValuationcontrolsCommon valuationcontrolCommon = new ValuationcontrolsCommon();
645         valuationcontrolCommon.setValuationcontrolRefNumber(valuationcontrolRefNumber);
646         valuationcontrolCommon.setValueNote(getUTF8DataFragment());
647
648         PoxPayloadOut multipart = new PoxPayloadOut(this.getServicePathComponent());
649         PayloadOutputPart commonPart = multipart.addPart(new ValuationcontrolClient().getCommonPartName(),
650                         valuationcontrolCommon);
651
652         if (logger.isDebugEnabled()) {
653             logger.debug("to be created, valuationcontrol common");
654             logger.debug(objectAsXmlString(valuationcontrolCommon, ValuationcontrolsCommon.class));
655         }
656
657         return multipart;
658     }
659
660     @Override
661     public void CRUDTests(String testName) {
662         // TODO Auto-generated method stub
663         
664     }
665
666     @Override
667     protected PoxPayloadOut createInstance(String commonPartName,
668             String identifier) {
669         PoxPayloadOut result = createValuationcontrolInstance(identifier);
670         return result;
671     }
672
673     @Override
674     protected ValuationcontrolsCommon updateInstance(ValuationcontrolsCommon commonPartObject) {
675         // TODO Auto-generated method stub
676         return null;
677     }
678
679     @Override
680     protected void compareUpdatedInstances(ValuationcontrolsCommon original,
681             ValuationcontrolsCommon updated) throws Exception {
682         // TODO Auto-generated method stub
683         
684     }
685 }