@Test
public void testToHL7() {

    PatientInfo patientInfo = new PatientInfo();
    Name name = new XpnName();
    name.setFamilyName("Jo|man");
    name.setGivenName("Jo|chen");
    name.setSecondAndFurtherGivenNames("Jo|achim");
    name.setSuffix("von Jo|del");
    name.setPrefix("Jo|dler");
    patientInfo.setName(name);
    assertEquals("Jo\\F\\man^Jo\\F\\chen^Jo\\F\\achim^von Jo\\F\\del^Jo\\F\\dler", 
            transformer.toHL7(patientInfo).get(0));
}