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