### Question:
RadiologyOrderResource extends DataDelegatingCrudResource<RadiologyOrder> { @PropertyGetter("display") public String getDisplayString(RadiologyOrder radiologyOrder) { if (radiologyOrder.getConcept() == null) { return radiologyOrder.getAccessionNumber() + " - " + "[No Concept]"; } else { return radiologyOrder.getAccessionNumber() + " - " + radiologyOrder.getConcept() .getName() .getName(); } }  @Override DelegatingResourceDescription getRepresentationDescription(Representation rep); @Override String getResourceVersion(); @Override RadiologyOrder getByUniqueId(String uniqueId); @PropertyGetter("display") String getDisplayString(RadiologyOrder radiologyOrder); @Override RadiologyOrder newDelegate(); @Override RadiologyOrder save(RadiologyOrder delegate); @Override void purge(RadiologyOrder delegate, RequestContext context);  }### Answer:
@Test public void shouldReturnAccessionNumberAndConceptNameOfGivenRadiologyOrder() throws Exception { ConceptName conceptName = new ConceptName(); conceptName.setName("X-RAY, HEAD"); conceptName.setLocale(localeEn); Concept concept = new Concept(); concept.addName(conceptName); concept.setPreferredName(conceptName); radiologyOrder.setConcept(concept); assertThat(radiologyOrderResource.getDisplayString(radiologyOrder), is("1 - X-RAY, HEAD")); }
@Test public void shouldReturnNoConceptStringIfGivenRadiologyOrdersConceptIsNull() throws Exception { assertThat(radiologyOrderResource.getDisplayString(radiologyOrder), is("1 - [No Concept]")); }