PatientCorrelationProxyWebServiceUnsecuredImpl implements PatientCorrelationProxy { @Override public void addPatientCorrelationPLQ(PatientLocationQueryResponseType plqRecords, AssertionType assertion) { AddPatientCorrelationPLQRequestType request = new AddPatientCorrelationPLQRequestType(); request.setPatientLocationQueryResponse(plqRecords); request.setAssertion(assertion); try { final String url = oProxyHelper.getUrlLocalHomeCommunity(NhincConstants.PATIENT_CORRELATION_SERVICE_NAME); if (plqRecords == null) { throw new IllegalArgumentException(REQUEST_MESSAGE_MUST_BE_PROVIDED); } else if (assertion == null) { throw new IllegalArgumentException(ASSERTION_MUST_BE_PROVIDED); } else { final ServicePortDescriptor<PatientCorrelationPortType> portDescriptor = new PatientCorrelationAddPLQServicePortDescriptor(); final CONNECTClient<PatientCorrelationPortType> client = getCONNECTClientFactory() .getCONNECTClientUnsecured(portDescriptor, url, assertion); client.invokePort(PatientCorrelationPortType.class,"addPatientCorrelationPLQ", request); } } catch (final Exception ex) { throw new ErrorEventException(ex,UNABLE_TO_CALL); } LOG.debug("End addPatientCorrelationPLQ"); } PatientCorrelationProxyWebServiceUnsecuredImpl(); ServicePortDescriptor<PatientCorrelationPortType> getRetrieveServicePortDescriptor(); @Override RetrievePatientCorrelationsResponseType retrievePatientCorrelations(final PRPAIN201309UV02 msg,
        final AssertionType assertion); @Override AddPatientCorrelationResponseType addPatientCorrelation(final PRPAIN201301UV02 msg,
        final AssertionType assertion); @Override void addPatientCorrelationPLQ(PatientLocationQueryResponseType plqRecords,
        AssertionType assertion);  }
@SuppressWarnings("unchecked") @Test public void testAddPatientCorrelationPLQ() throws Exception { PatientCorrelationProxyWebServiceUnsecuredImpl impl = getPatientCorrelationProxyWebServiceUnsecuredImpl(); impl.addPatientCorrelationPLQ(mockPLQrec, mockAssertion); verify(mockClient).invokePort(any(Class.class), any(String.class), any(AddPatientCorrelationPLQRequestType.class)); verify(mockCONNECTClientFactory).getCONNECTClientUnsecured(any(ServicePortDescriptor.class), any(String.class), any(AssertionType.class)); }