@Test public void testConvertByPatientId() throws Exception { converter.convert("1234"); verify(encounterService).getEncounter(1234); }
@Override public Encounter convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return encounterService.getEncounter(Integer.valueOf(id)); }else { return encounterService.getEncounterByUuid(id); } }
StringToEncounterConverter implements Converter<String, Encounter> { @Override public Encounter convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return encounterService.getEncounter(Integer.valueOf(id)); }else { return encounterService.getEncounterByUuid(id); } } }
StringToEncounterConverter implements Converter<String, Encounter> { @Override public Encounter convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return encounterService.getEncounter(Integer.valueOf(id)); }else { return encounterService.getEncounterByUuid(id); } }  }
StringToEncounterConverter implements Converter<String, Encounter> { @Override public Encounter convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return encounterService.getEncounter(Integer.valueOf(id)); }else { return encounterService.getEncounterByUuid(id); } }  void setEncounterService(EncounterService encounterService); @Override Encounter convert(String id); }
StringToEncounterConverter implements Converter<String, Encounter> { @Override public Encounter convert(String id) { if (StringUtils.isBlank(id)) { return null; } else if (ConversionUtil.onlyDigits(id)) { return encounterService.getEncounter(Integer.valueOf(id)); }else { return encounterService.getEncounterByUuid(id); } }  void setEncounterService(EncounterService encounterService); @Override Encounter convert(String id);  }