HL7QueryParamsTransforms { public static PRPAMT201306UV02PatientAddress createAddress(List<ADExplicit> patientAddress) { PRPAMT201306UV02PatientAddress subjectAddress = null; STExplicit text; if (patientAddress != null) { subjectAddress = new PRPAMT201306UV02PatientAddress(); for (ADExplicit address : patientAddress) { subjectAddress.getValue().add(address); text = new STExplicit(); subjectAddress.setSemanticsText(text); } } return subjectAddress; }  static JAXBElement<PRPAMT201306UV02QueryByParameter> createQueryParams(PRPAMT201301UV02Patient patient,
        String localDeviceId); static PRPAMT201306UV02ParameterList createParamList(PRPAMT201301UV02Patient patient); static PRPAMT201306UV02LivingSubjectId createSubjectId(II subjectId); static PRPAMT201306UV02LivingSubjectName createName(List<PNExplicit> patientNames); static PRPAMT201306UV02LivingSubjectBirthTime createBirthTime(String birthTime); static PRPAMT201306UV02LivingSubjectAdministrativeGender createGender(String gender); static PRPAMT201306UV02PatientAddress createAddress(List<ADExplicit> patientAddress); static PRPAMT201306UV02PatientTelecom createTelecom(List<TELExplicit> patientTelecom);  }
@Test public void createAddressNull() { PRPAMT201306UV02PatientAddress patientAddress = new PRPAMT201306UV02PatientAddress(); HL7QueryParamsTransforms queryTransforms = new HL7QueryParamsTransforms(); List<ADExplicit> patientAddressList = null; patientAddress = queryTransforms.createAddress(patientAddressList); assertNull(patientAddress); }
@Test public void createAddress() { PRPAMT201306UV02PatientAddress patientAddress = new PRPAMT201306UV02PatientAddress(); HL7QueryParamsTransforms queryTransforms = new HL7QueryParamsTransforms(); patientAddress = queryTransforms.createAddress(patientAddressList()); assertEquals(patientAddress.getValue().get(0).getUse().get(0), "12601, FairLakes"); }