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 (c) 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.IntegrationTests.test;
25 import java.io.StringWriter;
26 import java.math.BigDecimal;
27 import java.util.ArrayList;
28 import java.util.List;
30 import javax.ws.rs.core.MediaType;
31 import javax.ws.rs.core.Response;
32 import javax.xml.bind.JAXBContext;
33 import javax.xml.bind.Marshaller;
35 import org.testng.Assert;
36 import org.testng.annotations.AfterClass;
37 import org.testng.annotations.Test;
38 import org.slf4j.Logger;
39 import org.slf4j.LoggerFactory;
40 import org.collectionspace.services.client.CollectionObjectClient;
41 import org.collectionspace.services.client.DimensionClient;
42 import org.collectionspace.services.client.DimensionFactory;
43 import org.collectionspace.services.client.PayloadOutputPart;
44 import org.collectionspace.services.client.PoxPayloadIn;
45 import org.collectionspace.services.client.PoxPayloadOut;
46 import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
47 import org.collectionspace.services.client.IntakeClient;
48 import org.collectionspace.services.intake.IntakesCommon;
49 import org.collectionspace.services.client.RelationClient;
50 import org.collectionspace.services.client.workflow.WorkflowClient;
51 import org.collectionspace.services.dimension.DimensionsCommon;
52 import org.collectionspace.services.relation.RelationsCommon;
53 import org.collectionspace.services.relation.RelationsCommonList;
54 import org.collectionspace.services.relation.RelationshipType;
59 * @version $Revision:$
61 public class RelationIntegrationTest extends CollectionSpaceIntegrationTest {
63 final Logger logger = LoggerFactory
64 .getLogger(RelationIntegrationTest.class);
66 // Get clients for the CollectionSpace services
68 private CollectionObjectClient collectionObjectClient;
69 private RelationClient relationClient;
70 private IntakeClient intakeClient;
71 private DimensionClient dimensionClient;
73 private static final int OBJECTS_TO_INTAKE = 1;
75 public RelationIntegrationTest() throws Exception {
76 collectionObjectClient = new CollectionObjectClient();
77 relationClient = new RelationClient();
78 intakeClient = new IntakeClient();
79 dimensionClient = new DimensionClient();
82 @AfterClass(alwaysRun = true)
83 public void cleanUp() {
84 relationClient.cleanup();
85 collectionObjectClient.cleanup();
86 intakeClient.cleanup();
87 dimensionClient.cleanup();
91 * Object as xml string.
94 * @param clazz the clazz
97 static protected String objectAsXmlString(Object o, Class<?> clazz) {
98 StringWriter sw = new StringWriter();
100 JAXBContext jc = JAXBContext.newInstance(clazz);
101 Marshaller m = jc.createMarshaller();
102 m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
105 } catch (Exception e) {
108 return sw.toString();
111 private PoxPayloadOut createDimensionInstance(String commonPartName, String dimensionType, String dimensionValue, String entryDate) {
112 DimensionsCommon dimensionsCommon = new DimensionsCommon();
113 dimensionsCommon.setDimension(dimensionType);
114 dimensionsCommon.setValue(new BigDecimal(dimensionValue));
115 dimensionsCommon.setValueDate(entryDate);
116 PoxPayloadOut multipart = DimensionFactory.createDimensionInstance(
117 commonPartName, dimensionsCommon);
119 if (logger.isDebugEnabled()) {
120 logger.debug("to be created, dimension common");
121 logger.debug(objectAsXmlString(dimensionsCommon,
122 DimensionsCommon.class));
128 protected PoxPayloadOut createDimensionInstance(String identifier) throws Exception {
129 DimensionClient client = new DimensionClient();
130 return createDimensionInstance(client.getCommonPartName(), identifier);
134 * Creates the dimension instance.
136 * @param identifier the identifier
137 * @return the multipart output
139 protected PoxPayloadOut createDimensionInstance(String commonPartName, String identifier) {
140 final String dimensionValue = Long.toString(System.currentTimeMillis());
142 return createDimensionInstance(commonPartName,
143 "dimensionType-" + identifier,
145 "entryDate-" + identifier);
148 @Test void deleteCollectionObjectRelationshipToLockedDimension() throws Exception {
149 // First create a CollectionObject
150 CollectionobjectsCommon co = new CollectionobjectsCommon();
151 fillCollectionObject(co, createIdentifier());
152 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
153 PayloadOutputPart commonPart = multipart.addPart(collectionObjectClient.getCommonPartName(), co);
155 // Make the "create" call and check the response
156 Response response = collectionObjectClient.create(multipart);
157 String collectionObjectCsid = null;
159 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
161 collectionObjectCsid = extractId(response);
162 collectionObjectClient.addToCleanup(collectionObjectCsid);
167 // Create a new dimension record
168 multipart = this.createDimensionInstance(createIdentifier());
169 // Make the call to create and check the response
170 response = dimensionClient.create(multipart);
171 String dimensionCsid1 = null;
173 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
174 dimensionCsid1 = extractId(response);
175 dimensionClient.addToCleanup(dimensionCsid1);
180 // Relate the entities, by creating a new relation object
181 RelationsCommon relation = new RelationsCommon();
182 fillRelation(relation, collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(),
183 dimensionCsid1, DimensionsCommon.class.getSimpleName(),
184 "collectionobject-dimension");
185 // Create the part and fill it with the relation object
186 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
187 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
188 // Create the relationship
189 response = relationClient.create(multipart);
190 String relationCsid1 = null;
192 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
193 relationCsid1 = extractId(response);
194 relationClient.addToCleanup(relationCsid1);
199 // Now lock the dimension record.
201 Response workflowResponse = null;
203 workflowResponse = dimensionClient.updateWorkflowWithTransition(
204 dimensionCsid1, WorkflowClient.WORKFLOWTRANSITION_LOCK);
205 System.out.println("Locked dimension record with CSID=" + dimensionCsid1);
207 workflowResponse.close();
210 // Finally, try to delete the relationship
212 // Try to delete the relationship -should fail because we don't allow delete if one of the sides is locked.
213 response = relationClient.delete(relationCsid1);
215 Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode());
220 // Also, try to soft-delete. This should also fail.
221 workflowResponse = dimensionClient.updateWorkflowWithTransition(dimensionCsid1, WorkflowClient.WORKFLOWTRANSITION_DELETE);
222 System.out.println("Locked dimension record with CSID=" + dimensionCsid1);
223 workflowResponse.close();
225 // Now unlock the dimension record so we can cleanup all the records after the test suite completes.
227 workflowResponse = dimensionClient.updateWorkflowWithTransition(
228 dimensionCsid1, WorkflowClient.WORKFLOWTRANSITION_UNLOCK);
230 workflowResponse.close();
234 @Test void createCollectionObjectRelationshipToManyDimensions() throws Exception {
236 // First create a CollectionObject
238 CollectionobjectsCommon co = new CollectionobjectsCommon();
239 fillCollectionObject(co, createIdentifier());
240 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
241 PayloadOutputPart commonPart = multipart.addPart(collectionObjectClient.getCommonPartName(), co);
243 // Make the create call and check the response
244 Response response = collectionObjectClient.create(multipart);
245 String collectionObjectCsid = null;
247 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
249 collectionObjectCsid = extractId(response);
250 collectionObjectClient.addToCleanup(collectionObjectCsid);
255 //Next, create the first of three Dimension records to relate the collection object record
256 multipart = this.createDimensionInstance(createIdentifier());
257 // Make the call to create and check the response
258 response = dimensionClient.create(multipart);
259 String dimensionCsid1 = null;
261 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
262 dimensionCsid1 = extractId(response);
263 dimensionClient.addToCleanup(dimensionCsid1);
268 //Next, create a the second Dimension record
269 multipart = this.createDimensionInstance(createIdentifier());
270 // Make the call to create and check the response
271 response = dimensionClient.create(multipart);
272 String dimensionCsid2 = null;
274 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
275 dimensionCsid2 = extractId(response);
276 dimensionClient.addToCleanup(dimensionCsid2);
281 //Next, create a the 3rd Dimension record
282 multipart = this.createDimensionInstance(createIdentifier());
283 // Make the call to create and check the response
284 response = dimensionClient.create(multipart);
285 String dimensionCsid3 = null;
287 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
288 dimensionCsid3 = extractId(response);
289 dimensionClient.addToCleanup(dimensionCsid3);
294 // Relate the entities, by creating a new relation object
295 RelationsCommon relation = new RelationsCommon();
296 fillRelation(relation,
297 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), // the subject of the relationship
298 dimensionCsid1, DimensionsCommon.class.getSimpleName(), // the object of the relationship
299 "collectionobject-dimension");
300 // Create the part and fill it with the relation object
301 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
302 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
303 // Create the relationship
304 response = relationClient.create(multipart);
305 String relationCsid1 = null;
307 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
308 relationCsid1 = extractId(response);
309 relationClient.addToCleanup(relationCsid1);
313 // Wait 1 second and create the second relationship
316 } catch (InterruptedException e) {
317 // TODO Auto-generated catch block
320 relation = new RelationsCommon();
321 fillRelation(relation,
322 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), // the subject of the relationship
323 dimensionCsid2, DimensionsCommon.class.getSimpleName(), // the object of the relationship
324 "collectionobject-dimension");
325 // Create the part and fill it with the relation object
326 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
327 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
328 // Create the relationship
329 response = relationClient.create(multipart);
331 String relationCsid2 = null;
333 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
334 relationCsid2 = extractId(response);
335 relationClient.addToCleanup(relationCsid2);
339 // Wait 1 second and create the 3rd relationship
342 } catch (InterruptedException e) {
343 // TODO Auto-generated catch block
346 relation = new RelationsCommon();
347 fillRelation(relation,
348 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), // the subject of the relationship
349 dimensionCsid3, DimensionsCommon.class.getSimpleName(), // the object of the relationship
350 "collectionobject-dimension");
351 // Create the part and fill it with the relation object
352 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
353 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
354 // Create the relationship
355 response = relationClient.create(multipart);
357 String relationCsid3 = null;
359 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
360 relationCsid3 = extractId(response);
361 relationClient.addToCleanup(relationCsid3);
367 @Test void releteCollectionObjectToLockedDimension() throws Exception {
369 // First create a CollectionObject
371 CollectionobjectsCommon co = new CollectionobjectsCommon();
372 fillCollectionObject(co, createIdentifier());
374 // Next, create a part object
375 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
376 PayloadOutputPart commonPart = multipart.addPart(co, MediaType.APPLICATION_XML_TYPE);
377 commonPart.setLabel(collectionObjectClient.getCommonPartName());
379 // Make the create call and check the response
380 Response response = collectionObjectClient.create(multipart);
381 String collectionObjectCsid = null;
383 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
385 collectionObjectCsid = extractId(response);
386 collectionObjectClient.addToCleanup(collectionObjectCsid);
391 //Next, create a Dimension record to relate the collection object to
392 multipart = this.createDimensionInstance(createIdentifier());
393 // Make the call to create and check the response
394 response = dimensionClient.create(multipart);
395 String dimensionCsid = null;
397 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
398 dimensionCsid = extractId(response);
403 @SuppressWarnings("unused")
404 Response workflowResponse = dimensionClient.updateWorkflowWithTransition(dimensionCsid,
405 WorkflowClient.WORKFLOWTRANSITION_LOCK);
406 workflowResponse.close();
407 System.out.println("Locked dimension record with CSID=" + dimensionCsid);
409 // Lastly, relate the two entities, by creating a new relation object
410 RelationsCommon relation = new RelationsCommon();
411 fillRelation(relation, collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(),
412 dimensionCsid, DimensionsCommon.class.getSimpleName(),
413 "collectionobject-dimension");
414 // Create the part and fill it with the relation object
415 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
416 commonPart = multipart.addPart(relation, MediaType.APPLICATION_XML_TYPE);
417 commonPart.setLabel(relationClient.getCommonPartName());
419 // Make the call to create the relationship
420 Response relationresponse = relationClient.create(multipart);
421 String relationCsid = null;
423 Assert.assertEquals(relationresponse.getStatus(), Response.Status.BAD_REQUEST.getStatusCode());
424 relationCsid = extractId(response);
425 relationClient.addToCleanup(relationCsid);
427 relationresponse.close();
430 // Now unlock the dimension record so we can cleanup all the records after the test suite completes.
432 workflowResponse = dimensionClient.updateWorkflowWithTransition(
433 dimensionCsid, WorkflowClient.WORKFLOWTRANSITION_UNLOCK);
435 workflowResponse.close();
440 public void relateCollectionObjectToIntake() {
442 // First create a CollectionObject
444 CollectionobjectsCommon co = new CollectionobjectsCommon();
445 fillCollectionObject(co, createIdentifier());
447 // Next, create a part object
448 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
449 PayloadOutputPart commonPart = multipart.addPart(co, MediaType.APPLICATION_XML_TYPE);
450 commonPart.setLabel(collectionObjectClient.getCommonPartName());
452 // Make the create call and check the response
453 Response response = collectionObjectClient.create(multipart);
454 String collectionObjectCsid = null;
456 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
458 collectionObjectCsid = extractId(response);
459 collectionObjectClient.addToCleanup(collectionObjectCsid);
464 // Next, create an Intake object
465 IntakesCommon intake = new IntakesCommon();
466 fillIntake(intake, createIdentifier());
467 // Create the a part object
468 multipart = new PoxPayloadOut(IntakeClient.SERVICE_PAYLOAD_NAME);
469 commonPart = multipart.addPart(intake, MediaType.APPLICATION_XML_TYPE);
470 commonPart.setLabel(intakeClient.getCommonPartName());
472 // Make the call to create and check the response
473 response = intakeClient.create(multipart);
474 String intakeCsid = null;
476 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
477 intakeCsid = extractId(response);
478 intakeClient.addToCleanup(intakeCsid);
483 // Lastly, relate the two entities, by creating a new relation object
484 RelationsCommon relation = new RelationsCommon();
485 fillRelation(relation, collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(),
486 intakeCsid, IntakesCommon.class.getSimpleName(),
487 RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
488 // Create the part and fill it with the relation object
489 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
490 commonPart = multipart.addPart(relation, MediaType.APPLICATION_XML_TYPE);
491 commonPart.setLabel(relationClient.getCommonPartName());
493 // Make the call to crate
494 response = relationClient.create(multipart);
495 String relationCsid = null;
497 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
498 relationCsid = extractId(response);
499 relationClient.addToCleanup(relationCsid);
505 // Now try to retrieve the Intake record of the CollectionObject.
507 String predicate = RelationshipType.COLLECTIONOBJECT_INTAKE.toString();
508 Response resultResponse = relationClient.readList(
509 collectionObjectCsid,
510 null, //CollectionobjectsCommon.class.getSimpleName(),
513 null ); //IntakesCommon.class.getSimpleName());
514 RelationsCommonList relationList = null;
516 Assert.assertEquals(resultResponse.getStatus(), Response.Status.OK.getStatusCode());
517 relationList = resultResponse.readEntity(RelationsCommonList.class);
519 resultResponse.close();
523 // Each relation returned in the list needs to match what we
526 List<RelationsCommonList.RelationListItem> relationListItems = relationList.getRelationListItem();
527 Assert.assertFalse(relationListItems.isEmpty());
530 RelationsCommon resultRelation = null;
531 for(RelationsCommonList.RelationListItem listItem : relationListItems){
533 String foundCsid = listItem.getCsid();
534 Response multiPartResponse = null;
536 multiPartResponse = relationClient.read(foundCsid);
537 int responseStatus = multiPartResponse.getStatus();
538 Assert.assertEquals(responseStatus, Response.Status.OK.getStatusCode());
539 PoxPayloadIn input = new PoxPayloadIn(multiPartResponse.readEntity(String.class));
540 resultRelation = (RelationsCommon) extractPart(input,
541 relationClient.getCommonPartName());
542 } catch (Exception e) {
545 multiPartResponse.close();
548 Assert.assertEquals(resultRelation.getSubjectCsid(), collectionObjectCsid);
549 Assert.assertEquals(resultRelation.getRelationshipType(), RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
550 Assert.assertEquals(resultRelation.getObjectCsid(), intakeCsid);
551 System.out.println();
557 public void relateCollectionObjectsToIntake() {
558 relateCollectionObjectsToIntake(OBJECTS_TO_INTAKE);
561 private void relateCollectionObjectsToIntake(int numberOfObjects) {
564 // First create a list of CollectionObjects
566 CollectionobjectsCommon co = new CollectionobjectsCommon();
567 ArrayList<String>collectionObjectIDList = new ArrayList<String>(numberOfObjects);
568 for (int i = 0; i < numberOfObjects; i++) {
569 fillCollectionObject(co, createIdentifier());
571 // Next, create a part object
572 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
573 PayloadOutputPart commonPart = multipart.addPart(co, MediaType.APPLICATION_XML_TYPE);
574 commonPart.setLabel(collectionObjectClient.getCommonPartName());
576 // Make the create call and check the response
577 Response response = collectionObjectClient.create(multipart);
578 String collectionObjectCsid = null;
580 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
582 collectionObjectCsid = extractId(response);
583 collectionObjectIDList.add(collectionObjectCsid);
584 collectionObjectClient.addToCleanup(collectionObjectCsid);
591 // Next, create an Intake object
592 IntakesCommon intake = new IntakesCommon();
593 fillIntake(intake, createIdentifier());
594 // Create the a part object
595 PoxPayloadOut multipart = new PoxPayloadOut(IntakeClient.SERVICE_PAYLOAD_NAME);
596 PayloadOutputPart commonPart = multipart.addPart(intake, MediaType.APPLICATION_XML_TYPE);
597 commonPart.setLabel(intakeClient.getCommonPartName());
599 // Make the call to create and check the response
600 Response response = intakeClient.create(multipart);
601 String intakeCsid = null;
603 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
604 intakeCsid = extractId(response);
605 intakeClient.addToCleanup(intakeCsid);
610 // Lastly, relate the two entities, by creating a new relation object
611 RelationsCommon relation = new RelationsCommon();
612 for (String collectionObjectCsid : collectionObjectIDList) {
613 fillRelation(relation,
614 intakeCsid, IntakesCommon.class.getSimpleName(), //subject
615 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), //object
616 RelationshipType.COLLECTIONOBJECT_INTAKE.toString()); //predicate
617 // Create the part and fill it with the relation object
618 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
619 commonPart = multipart.addPart(relation, MediaType.APPLICATION_XML_TYPE);
620 commonPart.setLabel(relationClient.getCommonPartName());
622 // Make the call to crate
623 response = relationClient.create(multipart);
624 String relationCsid = null;
626 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
627 relationCsid = extractId(response);
628 relationClient.addToCleanup(relationCsid);
635 // Now try to retrieve the Intake record of the CollectionObject.
637 String predicate = RelationshipType.COLLECTIONOBJECT_INTAKE.toString();
638 RelationsCommonList relationList = null;
639 for (String collectionObjectCsid : collectionObjectIDList) {
640 Response resultResponse = relationClient.readList(
642 null, //IntakesCommon.class.getSimpleName(), //subject
644 collectionObjectCsid,
645 null); //CollectionobjectsCommon.class.getSimpleName()); //object
648 Assert.assertEquals(resultResponse.getStatus(), Response.Status.OK.getStatusCode());
649 relationList = resultResponse.readEntity(RelationsCommonList.class);
651 resultResponse.close();
655 // Each relation returned in the list needs to match what we
658 List<RelationsCommonList.RelationListItem> relationListItems = relationList.getRelationListItem();
659 Assert.assertFalse(relationListItems.isEmpty());
662 RelationsCommon resultRelation = null;
663 for(RelationsCommonList.RelationListItem listItem : relationListItems){
664 String foundCsid = listItem.getCsid();
665 Response multiPartResponse = null;
667 multiPartResponse = relationClient.read(foundCsid);
668 int responseStatus = multiPartResponse.getStatus();
669 Assert.assertEquals(responseStatus, Response.Status.OK.getStatusCode());
670 PoxPayloadIn input = new PoxPayloadIn(multiPartResponse.readEntity(String.class));
671 resultRelation = (RelationsCommon) extractPart(input, relationClient.getCommonPartName());
672 } catch (Exception e) {
675 multiPartResponse.close();
678 Assert.assertEquals(resultRelation.getSubjectCsid(), intakeCsid);
679 Assert.assertEquals(resultRelation.getRelationshipType(), RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
680 Assert.assertEquals(resultRelation.getObjectCsid(), collectionObjectCsid);
681 System.out.println();