VerifyMode implements ResponseMode { protected PRPAIN201305UV02 convert201306to201305(PRPAIN201306UV02 response) { PRPAIN201305UV02 result = null; String localHCID = getLocalHomeCommunityId(); String remoteHCID = getSenderCommunityId(response); PRPAMT201301UV02Patient patient = extractPatient(response); if (patient != null) { result = HL7PRPA201305Transforms.createPRPA201305(patient, remoteHCID, localHCID, localHCID); } return result; } VerifyMode(); @Override PRPAIN201306UV02 processResponse(ResponseParams params); @Override PRPAIN201306UV02 processResponse(PRPAIN201306UV02 response, AssertionType assertion, II localPatientId); PRPAIN201306UV02 processResponse(PRPAIN201305UV02 requestMsg, PRPAIN201306UV02 response,
        AssertionType assertion, NhinTargetSystemType target);  }
@Test public void testConvert201306to201305() { JAXBElement<PRPAMT201301UV02Person> person = HL7PatientTransforms.create201301PatientPerson("Joe", "Smith", "M", null, null); PRPAMT201301UV02Patient patient = HL7PatientTransforms.create201301Patient(person, "1234", "1.1.1"); PRPAIN201305UV02 request = HL7PRPA201305Transforms.createPRPA201305(patient, "1.1", "2.2", "1.1.1"); PRPAIN201306UV02 response = HL7PRPA201306Transforms.createPRPA201306(patient, "2.2", "1.1.1", "1.1", "2.2.2", request); VerifyMode verifyMode = new VerifyMode() { @Override protected String getLocalHomeCommunityId() { return "1.1"; } @Override protected String getSenderCommunityId(PRPAIN201306UV02 response) { return "2.2"; } }; PRPAIN201305UV02 result = verifyMode.convert201306to201305(response); assertEquals("1234", result.getControlActProcess().getQueryByParameter().getValue().getParameterList() .getLivingSubjectId().get(0).getValue().get(0).getExtension()); }