private EncounterTransaction.Order createOrder( String uuid, String conceptName, String action, Date dateStopped) { EncounterTransaction.Order order = new EncounterTransaction.Order(); EncounterTransaction.Concept concept = new EncounterTransaction.Concept(); concept.setName(conceptName); order.setConcept(concept); order.setAction(action); order.setDateStopped(dateStopped); order.setUuid(uuid); order.setOrderType(LabOrderResultsServiceImpl.LAB_ORDER_TYPE); return order; }
@Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); bahmniObservation1 = new BahmniObservation(); bahmniObservation2 = new BahmniObservation(); bahmniObservation3 = new BahmniObservation(); bahmniObservation4 = new BahmniObservation(); bahmniObservation5 = new BahmniObservation(); observationTemplateConcept = new ConceptBuilder().withUUID("otUUID").build(); EncounterTransaction.Concept conceptData = new EncounterTransaction.Concept(); conceptData.setName("Observation Template"); conceptData.setConceptClass("otClass"); conceptData.setDataType("N/A"); conceptData.setUuid("otUUID"); when(conceptMapper.map(observationTemplateConcept)).thenReturn(conceptData); observationTemplateMapper = new ObservationTemplateMapper(conceptMapper); }