PatientIds { @Override public String toString() { return String.format("pid: %s | dfn: %s | icn: %s | uid: %s | edipi: %s", pid, dfn, icn, uid, edipi); } PatientIds(Builder builder); String getPid(); void setPid(String pid); String getDfn(); void setDfn(String dfn); String getIcn(); void setIcn(String icn); String getUid(); void setUid(String uid); String getEdipi(); void setEdipi(String edipi); @Override String toString(); Map toMap(); static PatientIds fromMap(Map<String, String> map);  }
@Test public void testToString() { PatientIds patientIds = new PatientIds.Builder() .edipi(edipi) .dfn(dfn) .pid(pid) .icn(icn) .uid(uid) .build(); assertThat(patientIds.toString(), is("pid: "+pid+" | dfn: "+dfn+" | icn: "+icn+" | uid: "+uid+" | edipi: "+edipi)); }