@Test public void testGetGeneralExpMessage_add() { final JAXBException JAXBExceptionMock = mock(JAXBException.class); final PixManagerBean pixManagerBean = new PixManagerBean(); sut.getGeneralExpMessage(JAXBExceptionMock, pixManagerBean, PixManagerConstants.PIX_ADD); assertTrue("Actual Add message " + pixManagerBean.getAddMessage(), pixManagerBean.getAddMessage().startsWith("Add Failure! ")); }
protected void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean, String msg) { logger.error("Unexpected exception", e); logger.error("error", "Query Failure! Server error! A unexpected error has occured"); final String errMsg = " Failure! Server error! A unexpected error has occured"; logger.error("exception: " + e.getCause()); logger.error("detail message: " + e.getMessage()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + errMsg); } else if (PixManagerConstants.PIX_QUERY.equalsIgnoreCase(msg)) { pixMgrBean.setQueryMessage(msg + errMsg); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + errMsg); } }
PixOperationsServiceImpl implements PixOperationsService { protected void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean, String msg) { logger.error("Unexpected exception", e); logger.error("error", "Query Failure! Server error! A unexpected error has occured"); final String errMsg = " Failure! Server error! A unexpected error has occured"; logger.error("exception: " + e.getCause()); logger.error("detail message: " + e.getMessage()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + errMsg); } else if (PixManagerConstants.PIX_QUERY.equalsIgnoreCase(msg)) { pixMgrBean.setQueryMessage(msg + errMsg); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + errMsg); } } }
PixOperationsServiceImpl implements PixOperationsService { protected void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean, String msg) { logger.error("Unexpected exception", e); logger.error("error", "Query Failure! Server error! A unexpected error has occured"); final String errMsg = " Failure! Server error! A unexpected error has occured"; logger.error("exception: " + e.getCause()); logger.error("detail message: " + e.getMessage()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + errMsg); } else if (PixManagerConstants.PIX_QUERY.equalsIgnoreCase(msg)) { pixMgrBean.setQueryMessage(msg + errMsg); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + errMsg); } }  }
PixOperationsServiceImpl implements PixOperationsService { protected void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean, String msg) { logger.error("Unexpected exception", e); logger.error("error", "Query Failure! Server error! A unexpected error has occured"); final String errMsg = " Failure! Server error! A unexpected error has occured"; logger.error("exception: " + e.getCause()); logger.error("detail message: " + e.getMessage()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + errMsg); } else if (PixManagerConstants.PIX_QUERY.equalsIgnoreCase(msg)) { pixMgrBean.setQueryMessage(msg + errMsg); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + errMsg); } }  @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 { protected void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean, String msg) { logger.error("Unexpected exception", e); logger.error("error", "Query Failure! Server error! A unexpected error has occured"); final String errMsg = " Failure! Server error! A unexpected error has occured"; logger.error("exception: " + e.getCause()); logger.error("detail message: " + e.getMessage()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + errMsg); } else if (PixManagerConstants.PIX_QUERY.equalsIgnoreCase(msg)) { pixMgrBean.setQueryMessage(msg + errMsg); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + errMsg); } }  @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);  }