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:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright © 2009 Regents of the University of California
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
15 * https://source.collectionspace.org/collection-space/LICENSE.txt
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.
23 package org.collectionspace.services.client.test;
25 import java.util.List;
26 import javax.ws.rs.core.MediaType;
27 import javax.ws.rs.core.Response;
29 import org.collectionspace.services.client.CollectionSpaceClient;
30 import org.collectionspace.services.client.MovementClient;
31 import org.collectionspace.services.jaxb.AbstractCommonList;
32 import org.collectionspace.services.movement.MovementsCommon;
33 import org.collectionspace.services.movement.MovementsCommonList;
34 import org.collectionspace.services.movement.MovementMethodsList;
36 import org.jboss.resteasy.client.ClientResponse;
38 import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
39 import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
40 import org.jboss.resteasy.plugins.providers.multipart.OutputPart;
41 import org.testng.Assert;
42 import org.testng.annotations.Test;
44 import org.slf4j.Logger;
45 import org.slf4j.LoggerFactory;
48 * MovementServiceTest, carries out tests against a
49 * deployed and running Movement Service.
51 * $LastChangedRevision$
54 public class MovementServiceTest extends AbstractServiceTestImpl {
57 private final Logger logger =
58 LoggerFactory.getLogger(MovementServiceTest.class);
60 // Instance variables specific to this test.
61 /** The service path component. */
62 final String SERVICE_PATH_COMPONENT = "movements";
64 /** The known resource id. */
65 private String knownResourceId = null;
68 * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
71 protected CollectionSpaceClient getClientInstance() {
72 return new MovementClient();
76 * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
79 protected AbstractCommonList getAbstractCommonList(
80 ClientResponse<AbstractCommonList> response) {
81 return response.getEntity(MovementsCommonList.class);
84 // ---------------------------------------------------------------
85 // CRUD tests : CREATE tests
86 // ---------------------------------------------------------------
89 * @see org.collectionspace.services.client.test.ServiceTest#create(java.lang.String)
92 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class)
93 public void create(String testName) throws Exception {
95 // Perform setup, such as initializing the type of service request
96 // (e.g. CREATE, DELETE), its valid and expected status codes, and
97 // its associated HTTP method name (e.g. POST, DELETE).
98 setupCreate(testName);
100 // Submit the request to the service and store the response.
101 MovementClient client = new MovementClient();
102 String identifier = createIdentifier();
103 MultipartOutput multipart = createMovementInstance(identifier);
104 ClientResponse<Response> res = client.create(multipart);
106 int statusCode = res.getStatus();
108 // Check the status code of the response: does it match
109 // the expected response(s)?
112 // Does it fall within the set of valid status codes?
113 // Does it exactly match the expected status code?
114 if(logger.isDebugEnabled()){
115 logger.debug(testName + ": status = " + statusCode);
117 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
118 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
119 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
121 // Store the ID returned from the first resource created
122 // for additional tests below.
123 if (knownResourceId == null){
124 knownResourceId = extractId(res);
125 if (logger.isDebugEnabled()) {
126 logger.debug(testName + ": knownResourceId=" + knownResourceId);
130 // Store the IDs from every resource created by tests,
131 // so they can be deleted after tests have been run.
132 allResourceIdsCreated.add(extractId(res));
136 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
139 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
140 dependsOnMethods = {"create"})
141 public void createList(String testName) throws Exception {
142 for(int i = 0; i < 3; i++){
148 // Placeholders until the three tests below can be uncommented.
149 // See Issue CSPACE-401.
151 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithEmptyEntityBody(java.lang.String)
154 public void createWithEmptyEntityBody(String testName) throws Exception {
155 //Should this really be empty?
159 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithMalformedXml(java.lang.String)
162 public void createWithMalformedXml(String testName) throws Exception {
163 //Should this really be empty?
167 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithWrongXmlSchema(java.lang.String)
170 public void createWithWrongXmlSchema(String testName) throws Exception {
171 //Should this really be empty?
176 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
177 dependsOnMethods = {"create", "testSubmitRequest"})
178 public void createWithEmptyEntityBody(String testName) throws Exception {
181 setupCreateWithEmptyEntityBody(testName);
183 // Submit the request to the service and store the response.
184 String method = REQUEST_TYPE.httpMethodName();
185 String url = getServiceRootURL();
186 String mediaType = MediaType.APPLICATION_XML;
187 final String entity = "";
188 int statusCode = submitRequest(method, url, mediaType, entity);
190 // Check the status code of the response: does it match
191 // the expected response(s)?
192 if(logger.isDebugEnabled()){
193 logger.debug("createWithEmptyEntityBody url=" + url +
194 " status=" + statusCode);
196 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
197 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
198 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
202 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
203 dependsOnMethods = {"create", "testSubmitRequest"})
204 public void createWithMalformedXml(String testName) throws Exception {
207 setupCreateWithMalformedXml(testName);
209 // Submit the request to the service and store the response.
210 String method = REQUEST_TYPE.httpMethodName();
211 String url = getServiceRootURL();
212 String mediaType = MediaType.APPLICATION_XML;
213 final String entity = MALFORMED_XML_DATA; // Constant from base class.
214 int statusCode = submitRequest(method, url, mediaType, entity);
216 // Check the status code of the response: does it match
217 // the expected response(s)?
218 if(logger.isDebugEnabled()){
219 logger.debug(testName + ": url=" + url +
220 " status=" + statusCode);
222 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
223 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
224 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
228 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
229 dependsOnMethods = {"create", "testSubmitRequest"})
230 public void createWithWrongXmlSchema(String testName) throws Exception {
233 setupCreateWithWrongXmlSchema(testName);
235 // Submit the request to the service and store the response.
236 String method = REQUEST_TYPE.httpMethodName();
237 String url = getServiceRootURL();
238 String mediaType = MediaType.APPLICATION_XML;
239 final String entity = WRONG_XML_SCHEMA_DATA;
240 int statusCode = submitRequest(method, url, mediaType, entity);
242 // Check the status code of the response: does it match
243 // the expected response(s)?
244 if(logger.isDebugEnabled()){
245 logger.debug(testName + ": url=" + url +
246 " status=" + statusCode);
248 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
249 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
250 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
254 // ---------------------------------------------------------------
255 // CRUD tests : READ tests
256 // ---------------------------------------------------------------
259 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#read(java.lang.String)
262 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
263 dependsOnMethods = {"create"})
264 public void read(String testName) throws Exception {
269 // Submit the request to the service and store the response.
270 MovementClient client = new MovementClient();
271 ClientResponse<MultipartInput> res = client.read(knownResourceId);
272 int statusCode = res.getStatus();
274 // Check the status code of the response: does it match
275 // the expected response(s)?
276 if(logger.isDebugEnabled()){
277 logger.debug(testName + ": status = " + statusCode);
279 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
280 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
281 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
283 MultipartInput input = (MultipartInput) res.getEntity();
284 MovementsCommon movement = (MovementsCommon) extractPart(input,
285 client.getCommonPartName(), MovementsCommon.class);
286 Assert.assertNotNull(movement);
291 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readNonExistent(java.lang.String)
294 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
295 dependsOnMethods = {"read"})
296 public void readNonExistent(String testName) throws Exception {
299 setupReadNonExistent(testName);
301 // Submit the request to the service and store the response.
302 MovementClient client = new MovementClient();
303 ClientResponse<MultipartInput> res = client.read(NON_EXISTENT_ID);
304 int statusCode = res.getStatus();
306 // Check the status code of the response: does it match
307 // the expected response(s)?
308 if(logger.isDebugEnabled()){
309 logger.debug(testName + ": status = " + statusCode);
311 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
312 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
313 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
316 // ---------------------------------------------------------------
317 // CRUD tests : READ_LIST tests
318 // ---------------------------------------------------------------
321 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readList(java.lang.String)
324 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
325 dependsOnMethods = {"createList", "read"})
326 public void readList(String testName) throws Exception {
329 setupReadList(testName);
331 // Submit the request to the service and store the response.
332 MovementClient client = new MovementClient();
333 ClientResponse<MovementsCommonList> res = client.readList();
334 MovementsCommonList list = res.getEntity();
335 int statusCode = res.getStatus();
337 // Check the status code of the response: does it match
338 // the expected response(s)?
339 if(logger.isDebugEnabled()){
340 logger.debug(testName + ": status = " + statusCode);
342 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
343 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
344 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
346 // Optionally output additional data about list members for debugging.
347 boolean iterateThroughList = false;
348 if(iterateThroughList && logger.isDebugEnabled()){
349 List<MovementsCommonList.MovementListItem> items =
350 list.getMovementListItem();
352 for(MovementsCommonList.MovementListItem item : items){
353 logger.debug(testName + ": list-item[" + i + "] csid=" +
355 logger.debug(testName + ": list-item[" + i + "] movementReferenceNumber=" +
356 item.getMovementReferenceNumber());
357 logger.debug(testName + ": list-item[" + i + "] URI=" +
367 // ---------------------------------------------------------------
368 // CRUD tests : UPDATE tests
369 // ---------------------------------------------------------------
372 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#update(java.lang.String)
375 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
376 dependsOnMethods = {"read"})
377 public void update(String testName) throws Exception {
380 setupUpdate(testName);
382 // Retrieve the contents of a resource to update.
383 MovementClient client = new MovementClient();
384 ClientResponse<MultipartInput> res =
385 client.read(knownResourceId);
386 if(logger.isDebugEnabled()){
387 logger.debug(testName + ": read status = " + res.getStatus());
389 Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
391 if(logger.isDebugEnabled()){
392 logger.debug("got object to update with ID: " + knownResourceId);
394 MultipartInput input = (MultipartInput) res.getEntity();
395 MovementsCommon movement = (MovementsCommon) extractPart(input,
396 client.getCommonPartName(), MovementsCommon.class);
397 Assert.assertNotNull(movement);
399 // Update the content of this resource.
400 movement.setMovementReferenceNumber("updated-" + movement.getMovementReferenceNumber());
401 movement.setLocationDate("updated-" + movement.getLocationDate());
402 if(logger.isDebugEnabled()){
403 logger.debug("to be updated object");
404 logger.debug(objectAsXmlString(movement, MovementsCommon.class));
406 // Submit the request to the service and store the response.
407 MultipartOutput output = new MultipartOutput();
408 OutputPart commonPart = output.addPart(movement, MediaType.APPLICATION_XML_TYPE);
409 commonPart.getHeaders().add("label", client.getCommonPartName());
411 res = client.update(knownResourceId, output);
412 int statusCode = res.getStatus();
413 // Check the status code of the response: does it match the expected response(s)?
414 if(logger.isDebugEnabled()){
415 logger.debug(testName + ": status = " + statusCode);
417 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
418 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
419 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
422 input = (MultipartInput) res.getEntity();
423 MovementsCommon updatedMovement =
424 (MovementsCommon) extractPart(input,
425 client.getCommonPartName(), MovementsCommon.class);
426 Assert.assertNotNull(updatedMovement);
428 Assert.assertEquals(updatedMovement.getLocationDate(),
429 movement.getLocationDate(),
430 "Data in updated object did not match submitted data.");
435 // Placeholders until the three tests below can be uncommented.
436 // See Issue CSPACE-401.
438 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithEmptyEntityBody(java.lang.String)
441 public void updateWithEmptyEntityBody(String testName) throws Exception{
442 //Should this really be empty?
446 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithMalformedXml(java.lang.String)
449 public void updateWithMalformedXml(String testName) throws Exception {
450 //Should this really be empty?
454 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithWrongXmlSchema(java.lang.String)
457 public void updateWithWrongXmlSchema(String testName) throws Exception {
458 //Should this really be empty?
463 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
464 dependsOnMethods = {"create", "update", "testSubmitRequest"})
465 public void updateWithEmptyEntityBody(String testName) throws Exception {
468 setupUpdateWithEmptyEntityBody(testName);
470 // Submit the request to the service and store the response.
471 String method = REQUEST_TYPE.httpMethodName();
472 String url = getResourceURL(knownResourceId);
473 String mediaType = MediaType.APPLICATION_XML;
474 final String entity = "";
475 int statusCode = submitRequest(method, url, mediaType, entity);
477 // Check the status code of the response: does it match
478 // the expected response(s)?
479 if(logger.isDebugEnabled()){
480 logger.debug(testName + ": url=" + url +
481 " status=" + statusCode);
483 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
484 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
485 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
489 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
490 dependsOnMethods = {"create", "update", "testSubmitRequest"})
491 public void updateWithMalformedXml(String testName) throws Exception {
494 setupUpdateWithMalformedXml(testName);
496 // Submit the request to the service and store the response.
497 String method = REQUEST_TYPE.httpMethodName();
498 String url = getResourceURL(knownResourceId);
499 String mediaType = MediaType.APPLICATION_XML;
500 final String entity = MALFORMED_XML_DATA;
501 int statusCode = submitRequest(method, url, mediaType, entity);
503 // Check the status code of the response: does it match
504 // the expected response(s)?
505 if(logger.isDebugEnabled()){
506 logger.debug(testName + ": url=" + url +
507 " status=" + statusCode);
509 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
510 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
511 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
515 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
516 dependsOnMethods = {"create", "update", "testSubmitRequest"})
517 public void updateWithWrongXmlSchema(String testName) throws Exception {
520 setupUpdateWithWrongXmlSchema(testName);
522 // Submit the request to the service and store the response.
523 String method = REQUEST_TYPE.httpMethodName();
524 String url = getResourceURL(knownResourceId);
525 String mediaType = MediaType.APPLICATION_XML;
526 final String entity = WRONG_XML_SCHEMA_DATA;
527 int statusCode = submitRequest(method, url, mediaType, entity);
529 // Check the status code of the response: does it match
530 // the expected response(s)?
531 if(logger.isDebugEnabled()){
532 logger.debug(testName + ": url=" + url +
533 " status=" + statusCode);
535 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
536 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
537 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
542 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateNonExistent(java.lang.String)
545 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
546 dependsOnMethods = {"update", "testSubmitRequest"})
547 public void updateNonExistent(String testName) throws Exception {
550 setupUpdateNonExistent(testName);
552 // Submit the request to the service and store the response.
553 // Note: The ID used in this 'create' call may be arbitrary.
554 // The only relevant ID may be the one used in update(), below.
555 MovementClient client = new MovementClient();
556 MultipartOutput multipart = createMovementInstance(NON_EXISTENT_ID);
557 ClientResponse<MultipartInput> res =
558 client.update(NON_EXISTENT_ID, multipart);
559 int statusCode = res.getStatus();
561 // Check the status code of the response: does it match
562 // the expected response(s)?
563 if(logger.isDebugEnabled()){
564 logger.debug(testName + ": status = " + statusCode);
566 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
567 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
568 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
571 // ---------------------------------------------------------------
572 // CRUD tests : DELETE tests
573 // ---------------------------------------------------------------
576 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String)
579 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
580 dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
581 public void delete(String testName) throws Exception {
584 setupDelete(testName);
586 // Submit the request to the service and store the response.
587 MovementClient client = new MovementClient();
588 ClientResponse<Response> res = client.delete(knownResourceId);
589 int statusCode = res.getStatus();
591 // Check the status code of the response: does it match
592 // the expected response(s)?
593 if(logger.isDebugEnabled()){
594 logger.debug(testName + ": status = " + statusCode);
596 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
597 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
598 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
603 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)
606 @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
607 dependsOnMethods = {"delete"})
608 public void deleteNonExistent(String testName) throws Exception {
611 setupDeleteNonExistent(testName);
613 // Submit the request to the service and store the response.
614 MovementClient client = new MovementClient();
615 ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
616 int statusCode = res.getStatus();
618 // Check the status code of the response: does it match
619 // the expected response(s)?
620 if(logger.isDebugEnabled()){
621 logger.debug(testName + ": status = " + statusCode);
623 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
624 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
625 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
628 // ---------------------------------------------------------------
629 // Utility tests : tests of code used in tests above
630 // ---------------------------------------------------------------
632 * Tests the code for manually submitting data that is used by several
633 * of the methods above.
635 @Test(dependsOnMethods = {"create", "read"})
636 public void testSubmitRequest() {
638 // Expected status code: 200 OK
639 final int EXPECTED_STATUS = Response.Status.OK.getStatusCode();
641 // Submit the request to the service and store the response.
642 String method = ServiceRequestType.READ.httpMethodName();
643 String url = getResourceURL(knownResourceId);
644 int statusCode = submitRequest(method, url);
646 // Check the status code of the response: does it match
647 // the expected response(s)?
648 if(logger.isDebugEnabled()){
649 logger.debug("testSubmitRequest: url=" + url +
650 " status=" + statusCode);
652 Assert.assertEquals(statusCode, EXPECTED_STATUS);
656 // ---------------------------------------------------------------
657 // Utility methods used by tests above
658 // ---------------------------------------------------------------
660 * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent()
663 public String getServicePathComponent() {
664 return SERVICE_PATH_COMPONENT;
668 * Creates the movement instance.
670 * @param identifier the identifier
671 * @return the multipart output
673 private MultipartOutput createMovementInstance(String identifier) {
674 return createMovementInstance(
675 "movementReferenceNumber-" + identifier,
676 "locationDate-" + identifier);
680 * Creates an instance of a Movement record for testing.
682 * @param movementReferenceNumber A movement reference number.
683 * @param locationDate A location date.
684 * @return Multipart output suitable for use as a payload
685 * in a create or update request.
687 private MultipartOutput createMovementInstance(String movementReferenceNumber,
688 String locationDate) {
689 MovementsCommon movement = new MovementsCommon();
690 movement.setMovementReferenceNumber(movementReferenceNumber);
691 movement.setLocationDate(locationDate);
692 MovementMethodsList movementMethodsList = new MovementMethodsList();
693 List<String> methods = movementMethodsList.getMovementMethod();
694 // @TODO Use properly formatted refNames for representative movement
695 // methods in this example record. The values below are placeholders.
696 String identifier = createIdentifier();
697 methods.add("First Movement Method-" + identifier);
698 methods.add("Second Movement Method-" + identifier);
699 movement.setMovementMethods(movementMethodsList);
700 MultipartOutput multipart = new MultipartOutput();
701 OutputPart commonPart =
702 multipart.addPart(movement, MediaType.APPLICATION_XML_TYPE);
703 commonPart.getHeaders().add("label", new MovementClient().getCommonPartName());
705 if(logger.isDebugEnabled()){
706 logger.debug("to be created, movement common");
707 logger.debug(objectAsXmlString(movement, MovementsCommon.class));