use of com.nedap.archie.rm.changecontrol.Contribution in project openEHR_SDK by ehrbase.
the class CanonicalJsonMarshallingTest method marshallContribution.
@Test
public void marshallContribution() {
List<ObjectRef<? extends ObjectId>> versions = new ArrayList<>();
versions.add(new ObjectRef<>(new HierObjectId("COMPOSITION"), "local", "b5c4aaed-2adc-4c56-9005-e21ff3cca62a::local.ehrbase.org::2"));
Contribution expected = new Contribution();
expected.setUid(new HierObjectId("bbf60d27-9200-4995-a950-279f889d1050"));
expected.setVersions(versions);
CanonicalJson cut = new CanonicalJson();
String json = cut.marshal(expected);
Contribution actual = cut.unmarshal(json, Contribution.class);
Assert.assertEquals(actual, expected);
}
Aggregations