@Test public void testGetGeneralExpMessage_Update() { JAXBException JAXBExceptionMock = mock(JAXBException.class); PixManagerBean pixManagerBean = new PixManagerBean(); sut.getGeneralExpMessage(JAXBExceptionMock, pixManagerBean, PixManagerConstants.PIX_UPDATE); assertTrue( "Actual Update message " + pixManagerBean.getUpdateMessage(), pixManagerBean.getUpdateMessage() .startsWith("Update Failure! ")); }
public 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); } }
PixManagerMessageHelper { public 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); } } }
PixManagerMessageHelper { public 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); } }  }
PixManagerMessageHelper { public 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); } }  void getAddUpdateMessage(MCCIIN000002UV01 response,
			PixManagerBean pixMgrBean, String msg); void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean,
			String msg); @SuppressWarnings("unchecked") PixManagerBean getQueryMessage(PRPAIN201310UV02 response,
			PixManagerBean pixMgrBean); boolean isSuccess(MCCIIN000002UV01 response); }
PixManagerMessageHelper { public 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); } }  void getAddUpdateMessage(MCCIIN000002UV01 response,
			PixManagerBean pixMgrBean, String msg); void getGeneralExpMessage(Exception e, PixManagerBean pixMgrBean,
			String msg); @SuppressWarnings("unchecked") PixManagerBean getQueryMessage(PRPAIN201310UV02 response,
			PixManagerBean pixMgrBean); boolean isSuccess(MCCIIN000002UV01 response);  }