private Concept setupConcept(ConceptService mockConceptService, String name, String mappingCode) { Concept concept = new Concept(); concept.addName(new ConceptName(name, Locale.ENGLISH)); concept.addConceptMapping( new ConceptMap(new ConceptReferenceTerm(emrConceptSource, mappingCode, null), sameAs)); when(mockConceptService.getConceptByMapping(mappingCode, emrConceptSource.getName())) .thenReturn(concept); return concept; }