PatientCorrelationProxyWebServiceUnsecuredImpl implements PatientCorrelationProxy { @Override public RetrievePatientCorrelationsResponseType retrievePatientCorrelations(final PRPAIN201309UV02 msg, final AssertionType assertion) { LOG.debug("Begin retrievePatientCorrelations"); RetrievePatientCorrelationsResponseType response = null; try { final String url = oProxyHelper.getUrlLocalHomeCommunity(NhincConstants.PATIENT_CORRELATION_SERVICE_NAME); if (msg == null) { throw new IllegalArgumentException(REQUEST_MESSAGE_MUST_BE_PROVIDED); } else if (assertion == null) { throw new IllegalArgumentException(ASSERTION_MUST_BE_PROVIDED); } else { final RetrievePatientCorrelationsRequestType request = new RetrievePatientCorrelationsRequestType(); request.setPRPAIN201309UV02(msg); request.setAssertion(assertion); final ServicePortDescriptor<PatientCorrelationPortType> portDescriptor = getRetrieveServicePortDescriptor(); final CONNECTClient<PatientCorrelationPortType> client = getCONNECTClientFactory() .getCONNECTClientUnsecured(portDescriptor, url, assertion); response = (RetrievePatientCorrelationsResponseType) client.invokePort(PatientCorrelationPortType.class, "retrievePatientCorrelations", request); } } catch (final Exception ex) { throw new ErrorEventException(ex,UNABLE_TO_CALL); } LOG.debug("End retrievePatientCorrelations"); return response; } 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 testretrievePatientCorrelations() throws Exception { PatientCorrelationProxyWebServiceUnsecuredImpl impl = getPatientCorrelationProxyWebServiceUnsecuredImpl(); impl.retrievePatientCorrelations(mock309, mockAssertion); verify(mockClient).invokePort(any(Class.class), any(String.class), any(Object.class)); verify(mockCONNECTClientFactory).getCONNECTClientUnsecured(any(ServicePortDescriptor.class), any(String.class), any(AssertionType.class)); }