@Test public void testConvertByPatientUuid() throws Exception { String uuid = "8d793bee-c2cc-11de-8d13-0010c6dffd0f"; converter.convert(uuid); verify(patientService).getPatientByUuid(uuid); }
@Override public Patient convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return patientService.getPatient(Integer.valueOf(id)); }else { return patientService.getPatientByUuid(id); } }
StringToPatientConverter implements Converter<String, Patient> { @Override public Patient convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return patientService.getPatient(Integer.valueOf(id)); }else { return patientService.getPatientByUuid(id); } } }
StringToPatientConverter implements Converter<String, Patient> { @Override public Patient convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return patientService.getPatient(Integer.valueOf(id)); }else { return patientService.getPatientByUuid(id); } }  }
StringToPatientConverter implements Converter<String, Patient> { @Override public Patient convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return patientService.getPatient(Integer.valueOf(id)); }else { return patientService.getPatientByUuid(id); } }  void setPatientService(PatientService patientService); @Override Patient convert(String id); }
StringToPatientConverter implements Converter<String, Patient> { @Override public Patient convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return patientService.getPatient(Integer.valueOf(id)); }else { return patientService.getPatientByUuid(id); } }  void setPatientService(PatientService patientService); @Override Patient convert(String id);  }