@Test public void testUpdatePerson() throws JAXBException, IOException { final String reqMock = "reqMock"; final PRPAIN201302UV02 requestMock = mock(PRPAIN201302UV02.class); final MCCIIN000002UV01 responseMock = mock(MCCIIN000002UV01.class); sut.setPixMgrService(pixMgrServiceMock); sut.setRequestXMLToJava(requestXMLToJavaMock); sut.setPixMgrBean(new PixManagerBean()); when( requestXMLToJavaMock.getPIXUpdateReqObject(reqMock, PixManagerConstants.ENCODE_STRING)).thenReturn( requestMock); when(pixMgrServiceMock.pixManagerPRPAIN201302UV02(requestMock)) .thenReturn(responseMock); final String actRet = sut.updatePerson(reqMock); assertTrue("actual value" + actRet, actRet.trim().length() == 0); }
@Override public String updatePerson(String reqXMLPath) { logger.debug("Received request to PIXUpdate"); PRPAIN201302UV02 request = new PRPAIN201302UV02(); MCCIIN000002UV01 response = new MCCIIN000002UV01(); try { request = requestXMLToJava.getPIXUpdateReqObject(reqXMLPath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201302UV02(request); getAddUpdateMessage(response, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } return pixMgrBean.getUpdateMessage(); }
PixOperationsServiceImpl implements PixOperationsService { @Override public String updatePerson(String reqXMLPath) { logger.debug("Received request to PIXUpdate"); PRPAIN201302UV02 request = new PRPAIN201302UV02(); MCCIIN000002UV01 response = new MCCIIN000002UV01(); try { request = requestXMLToJava.getPIXUpdateReqObject(reqXMLPath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201302UV02(request); getAddUpdateMessage(response, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } return pixMgrBean.getUpdateMessage(); } }
PixOperationsServiceImpl implements PixOperationsService { @Override public String updatePerson(String reqXMLPath) { logger.debug("Received request to PIXUpdate"); PRPAIN201302UV02 request = new PRPAIN201302UV02(); MCCIIN000002UV01 response = new MCCIIN000002UV01(); try { request = requestXMLToJava.getPIXUpdateReqObject(reqXMLPath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201302UV02(request); getAddUpdateMessage(response, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } return pixMgrBean.getUpdateMessage(); }  }
PixOperationsServiceImpl implements PixOperationsService { @Override public String updatePerson(String reqXMLPath) { logger.debug("Received request to PIXUpdate"); PRPAIN201302UV02 request = new PRPAIN201302UV02(); MCCIIN000002UV01 response = new MCCIIN000002UV01(); try { request = requestXMLToJava.getPIXUpdateReqObject(reqXMLPath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201302UV02(request); getAddUpdateMessage(response, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } return pixMgrBean.getUpdateMessage(); }  @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 String updatePerson(String reqXMLPath) { logger.debug("Received request to PIXUpdate"); PRPAIN201302UV02 request = new PRPAIN201302UV02(); MCCIIN000002UV01 response = new MCCIIN000002UV01(); try { request = requestXMLToJava.getPIXUpdateReqObject(reqXMLPath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201302UV02(request); getAddUpdateMessage(response, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_UPDATE); } return pixMgrBean.getUpdateMessage(); }  @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);  }