@Test public void testQueryPerson() throws JAXBException, IOException { final String reqMock = "reqMock"; final PRPAIN201309UV02 requestMock = mock(PRPAIN201309UV02.class); final PRPAIN201310UV02 responseMock = mock(PRPAIN201310UV02.class); final PixManagerBean pixMgrBean = new PixManagerBean(); sut.setPixMgrService(pixMgrServiceMock); sut.setRequestXMLToJava(requestXMLToJavaMock); when( requestXMLToJavaMock.getPIXQueryReqObject(reqMock, PixManagerConstants.ENCODE_STRING)).thenReturn( requestMock); when(pixMgrServiceMock.pixManagerPRPAIN201309UV02(requestMock)) .thenReturn(responseMock); final PixManagerBean actObj = sut.queryPerson(reqMock); assertEquals(pixMgrBean.getQueryMessage(), actObj.getQueryMessage()); }
@Override public PixManagerBean queryPerson(String xmlFilePath) { logger.debug("Received request to PIXQuery"); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); try { request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201309UV02(request); pixMgrBean = new PixManagerBean(); getQueryMessage(response, pixMgrBean); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; }
PixOperationsServiceImpl implements PixOperationsService { @Override public PixManagerBean queryPerson(String xmlFilePath) { logger.debug("Received request to PIXQuery"); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); try { request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201309UV02(request); pixMgrBean = new PixManagerBean(); getQueryMessage(response, pixMgrBean); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; } }
PixOperationsServiceImpl implements PixOperationsService { @Override public PixManagerBean queryPerson(String xmlFilePath) { logger.debug("Received request to PIXQuery"); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); try { request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201309UV02(request); pixMgrBean = new PixManagerBean(); getQueryMessage(response, pixMgrBean); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; }  }
PixOperationsServiceImpl implements PixOperationsService { @Override public PixManagerBean queryPerson(String xmlFilePath) { logger.debug("Received request to PIXQuery"); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); try { request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201309UV02(request); pixMgrBean = new PixManagerBean(); getQueryMessage(response, pixMgrBean); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; }  @Override MCCIIN000002UV01 addPatientRegistryRecord(String c32xml); @Override String addPerson(String reqXMLPath); SimpleMarshaller getMarshaller(); XdsbRepositoryService getXdsbRepository(); XmlAttributeSetter getXmlAttributeSetter(); @Override RegistryResponse provideAndRegisterClinicalDocument(String c32xml); @Override PixManagerBean queryPerson(String xmlFilePath); @Override MCCIIN000002UV01 revisePatientRegistryRecord(String c32xml); void setMarshaller(SimpleMarshaller marshaller); void setPixManagerTransformService(
			PixManagerTransformService pixManagerTransformService); void setPixMgrService(PixManagerService pixMgrService); void setRequestXMLToJava(PixManagerRequestXMLToJava requestXMLToJava); void setXdsbRegistryGetter(XdsbRegistryGetter xdsbRegistryGetter); void setXdsbRepository(XdsbRepositoryService xdsbRepository); void setXmlAttributeSetter(XmlAttributeSetter xmlAttributeSetter); @Override String updatePatientAndAuthorId(String c32xml); @Override String updatePerson(String reqXMLPath); }
PixOperationsServiceImpl implements PixOperationsService { @Override public PixManagerBean queryPerson(String xmlFilePath) { logger.debug("Received request to PIXQuery"); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); try { request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201309UV02(request); pixMgrBean = new PixManagerBean(); getQueryMessage(response, pixMgrBean); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; }  @Override MCCIIN000002UV01 addPatientRegistryRecord(String c32xml); @Override String addPerson(String reqXMLPath); SimpleMarshaller getMarshaller(); XdsbRepositoryService getXdsbRepository(); XmlAttributeSetter getXmlAttributeSetter(); @Override RegistryResponse provideAndRegisterClinicalDocument(String c32xml); @Override PixManagerBean queryPerson(String xmlFilePath); @Override MCCIIN000002UV01 revisePatientRegistryRecord(String c32xml); void setMarshaller(SimpleMarshaller marshaller); void setPixManagerTransformService(
			PixManagerTransformService pixManagerTransformService); void setPixMgrService(PixManagerService pixMgrService); void setRequestXMLToJava(PixManagerRequestXMLToJava requestXMLToJava); void setXdsbRegistryGetter(XdsbRegistryGetter xdsbRegistryGetter); void setXdsbRepository(XdsbRepositoryService xdsbRepository); void setXmlAttributeSetter(XmlAttributeSetter xmlAttributeSetter); @Override String updatePatientAndAuthorId(String c32xml); @Override String updatePerson(String reqXMLPath);  }