PixOperationsServiceImpl implements PixOperationsService { @Override public String addPerson(String reqXMLPath) { PRPAIN201301UV02 request = new PRPAIN201301UV02(); MCCIIN000002UV01 response = new MCCIIN000002UV01(); try { request = requestXMLToJava.getPIXAddReqObject(reqXMLPath, PixManagerConstants.ENCODE_STRING); response = pixMgrService.pixManagerPRPAIN201301UV02(request); getAddUpdateMessage(response, pixMgrBean, PixManagerConstants.PIX_ADD); } catch (final JAXBException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_ADD); } catch (final IOException e) { getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_ADD); } return pixMgrBean.getAddMessage(); }  @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);  }
@Test public void testAddPerson() throws JAXBException, IOException { final String reqMock = "reqMock"; final PRPAIN201301UV02 requestMock = mock(PRPAIN201301UV02.class); final MCCIIN000002UV01 responseMock = mock(MCCIIN000002UV01.class); sut.setPixMgrService(pixMgrServiceMock); sut.setRequestXMLToJava(requestXMLToJavaMock); sut.setPixMgrBean(new PixManagerBean()); when( requestXMLToJavaMock.getPIXAddReqObject(reqMock, PixManagerConstants.ENCODE_STRING)).thenReturn( requestMock); when(pixMgrServiceMock.pixManagerPRPAIN201301UV02(requestMock)) .thenReturn(responseMock); final String actRet = sut.addPerson(reqMock); assertTrue("actual value" + actRet, actRet.trim().length() == 0); }