KenyaEmrServiceImpl extends BaseOpenmrsService implements KenyaEmrService { @Override public void setupMrnIdentifierSource(String startFrom) { PatientIdentifierType idType = MetadataUtils.existing(PatientIdentifierType.class, CommonMetadata._PatientIdentifierType.OPENMRS_ID); setupIdentifierSource(idType, startFrom, OPENMRS_MEDICAL_RECORD_NUMBER_NAME, null, "M"); }  void setKenyaEmrDAO(KenyaEmrDAO dao); @Override boolean isSetupRequired(); @Override void setDefaultLocation(Location location); @Override Location getDefaultLocation(); @Override String getDefaultLocationMflCode(); @Override Location getLocationByMflCode(String mflCode); @Override String getNextHivUniquePatientNumber(String comment); @Override List<Visit> getVisitsByPatientAndDay(Patient patient, Date date); @Override void setupMrnIdentifierSource(String startFrom); @Override void setupHivUniqueIdentifierSource(String startFrom); @Override List<Object> executeSqlQuery(String query, Map<String, Object> substitutions); @Override List<Object> executeHqlQuery(String query, Map<String, Object> substitutions);  }
@Test(expected = Exception.class) public void setupMrnIdentifierSource_shouldFailIfAlreadySetup() throws Exception { service.setupMrnIdentifierSource("4"); service.setupMrnIdentifierSource("4"); }