@Test public void testConcatPatientNameWithBlankMiddlename() { String fName = "Adam Bertil"; String lName = "Eriksson"; String name = IntygConverterUtil.concatPatientName(fName, " ", lName); assertEquals("Adam Bertil Eriksson", name); }
public static String concatPatientName(String fName, String mName, String lName) { StringBuilder sb = new StringBuilder(); sb.append(fName); if (!Strings.nullToEmpty(mName).trim().isEmpty()) { sb.append(" ").append(mName); } sb.append(" ").append(lName); return sb.toString().trim(); }
IntygConverterUtil { public static String concatPatientName(String fName, String mName, String lName) { StringBuilder sb = new StringBuilder(); sb.append(fName); if (!Strings.nullToEmpty(mName).trim().isEmpty()) { sb.append(" ").append(mName); } sb.append(" ").append(lName); return sb.toString().trim(); } }
IntygConverterUtil { public static String concatPatientName(String fName, String mName, String lName) { StringBuilder sb = new StringBuilder(); sb.append(fName); if (!Strings.nullToEmpty(mName).trim().isEmpty()) { sb.append(" ").append(mName); } sb.append(" ").append(lName); return sb.toString().trim(); } private  IntygConverterUtil(); }
IntygConverterUtil { public static String concatPatientName(String fName, String mName, String lName) { StringBuilder sb = new StringBuilder(); sb.append(fName); if (!Strings.nullToEmpty(mName).trim().isEmpty()) { sb.append(" ").append(mName); } sb.append(" ").append(lName); return sb.toString().trim(); } private  IntygConverterUtil(); static SendType buildSendTypeFromUtlatande(Utlatande utlatande); static String concatPatientName(String fName, String mName, String lName); static String buildVardReferensId(String intygId); static String buildVardReferensId(String intygId, LocalDateTime ts); static List<Status> buildStatusesFromUtkast(Utkast draft); static HoSPersonal buildHosPersonalFromWebCertUser(WebCertUser user, Vardenhet vardenhet); }
IntygConverterUtil { public static String concatPatientName(String fName, String mName, String lName) { StringBuilder sb = new StringBuilder(); sb.append(fName); if (!Strings.nullToEmpty(mName).trim().isEmpty()) { sb.append(" ").append(mName); } sb.append(" ").append(lName); return sb.toString().trim(); } private  IntygConverterUtil(); static SendType buildSendTypeFromUtlatande(Utlatande utlatande); static String concatPatientName(String fName, String mName, String lName); static String buildVardReferensId(String intygId); static String buildVardReferensId(String intygId, LocalDateTime ts); static List<Status> buildStatusesFromUtkast(Utkast draft); static HoSPersonal buildHosPersonalFromWebCertUser(WebCertUser user, Vardenhet vardenhet);  }