use of com.b2international.snowowl.fhir.core.model.conceptmap.Group in project snow-owl by b2ihealthcare.
the class GroupTest method deserialize.
@Test
public void deserialize() throws Exception {
Group readGroup = objectMapper.readValue(objectMapper.writeValueAsString(group), Group.class);
validate(readGroup);
}
use of com.b2international.snowowl.fhir.core.model.conceptmap.Group in project snow-owl by b2ihealthcare.
the class GroupTest method serializeWithMissingOptionalFields.
@Test
public void serializeWithMissingOptionalFields() throws Exception {
Group group = Group.builder().addElement(ConceptMapElement.builder().code("ElementCode").display("ElementDisplay").build()).build();
JsonPath jsonPath = getJsonPath(group);
assertNull(jsonPath.get("source"));
assertNull(jsonPath.get("sourceVersion"));
assertNull(jsonPath.get("target"));
assertNull(jsonPath.get("targetVersion"));
assertThat(jsonPath.get("element.code"), hasItem("ElementCode"));
assertThat(jsonPath.get("element.display"), hasItem("ElementDisplay"));
assertNull(jsonPath.get("unmapped"));
}