PixRetrieveBuilder { public PRPAIN201309UV02 createPixRetrieve( RetrievePatientCorrelationsRequestType retrievePatientCorrelationsRequest) { List<String> targetAssigningAuthorities = extractTargetAssigningAuthorities(retrievePatientCorrelationsRequest); PRPAIN201309UV02 pixRetrieve = createTransmissionWrapper("1.1", null); PRPAIN201309UV02QUQIMT021001UV01ControlActProcess controlActProcess = createBaseControlActProcess(); PRPAMT201307UV02QueryByParameter queryByParameter = createQueryByParameter( retrievePatientCorrelationsRequest.getQualifiedPatientIdentifier(), targetAssigningAuthorities); JAXBElement<PRPAMT201307UV02QueryByParameter> createQueryByParameterElement = createQueryByParameterElement( queryByParameter); controlActProcess.setQueryByParameter(createQueryByParameterElement); pixRetrieve.setControlActProcess(controlActProcess); return pixRetrieve; } PixRetrieveBuilder();  PixRetrieveBuilder(AssigningAuthorityHomeCommunityMappingHelper aaMappingHelper); PRPAIN201309UV02 createPixRetrieve(
        RetrievePatientCorrelationsRequestType retrievePatientCorrelationsRequest); static final String ControlActProcessCode; }
@Test public void testcreatePixRetrieve() { PixRetrieveBuilder builder = new PixRetrieveBuilder(); PRPAIN201309UV02 pixRetrieve = new PRPAIN201309UV02(); pixRetrieve = builder.createPixRetrieve(createRetrievePatientCorrelationsRequest()); assertEquals(pixRetrieve.getControlActProcess().getAuthorOrPerformer().get(0).getAssignedPerson() .getValue().getId().get(0).getNullFlavor().get(0), "NA"); assertEquals(pixRetrieve.getInteractionId().getExtension(), "PRPA_IN201309"); assertEquals(pixRetrieve.getId().getRoot(), "1.1"); }
@Test public void testcreatePixRetrieveWhenAANull() { PixRetrieveBuilder builder = new PixRetrieveBuilder(); PRPAIN201309UV02 pixRetrieve = new PRPAIN201309UV02(); pixRetrieve = builder.createPixRetrieve(createRetrievePatientCorrelationsRequestWhenAANull()); assertEquals(pixRetrieve.getControlActProcess().getAuthorOrPerformer().get(0).getAssignedPerson() .getValue().getId().get(0).getNullFlavor().get(0), "NA"); assertEquals(pixRetrieve.getInteractionId().getExtension(), "PRPA_IN201309"); assertEquals(pixRetrieve.getId().getRoot(), "1.1"); }