@Test public void testPossibleExceptionFromMetadata_NoMetadataKey() throws Exception { ThrowExceptionService service = new ThrowExceptionService(new PossibleExceptionFromMetadata(METADATA_KEY)); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(); try { execute(service, msg); } catch (ServiceException e) { fail(); } try { service.setExceptionGenerator(new PossibleExceptionFromMetadata()); execute(service, msg); } catch (ServiceException e) { fail(); } }
public void setExceptionGenerator(ExceptionGenerator eg) { exceptionGenerator = Args.notNull(eg, "exceptionGenerator"); }
ThrowExceptionService extends ServiceImp { public void setExceptionGenerator(ExceptionGenerator eg) { exceptionGenerator = Args.notNull(eg, "exceptionGenerator"); } }
ThrowExceptionService extends ServiceImp { public void setExceptionGenerator(ExceptionGenerator eg) { exceptionGenerator = Args.notNull(eg, "exceptionGenerator"); } ThrowExceptionService();  ThrowExceptionService(ExceptionGenerator eg);  ThrowExceptionService(String uniqueId, ExceptionGenerator eg); }
ThrowExceptionService extends ServiceImp { public void setExceptionGenerator(ExceptionGenerator eg) { exceptionGenerator = Args.notNull(eg, "exceptionGenerator"); } ThrowExceptionService();  ThrowExceptionService(ExceptionGenerator eg);  ThrowExceptionService(String uniqueId, ExceptionGenerator eg); void doService(AdaptrisMessage msg); ExceptionGenerator getExceptionGenerator(); void setExceptionGenerator(ExceptionGenerator eg); @Override void prepare(); }
ThrowExceptionService extends ServiceImp { public void setExceptionGenerator(ExceptionGenerator eg) { exceptionGenerator = Args.notNull(eg, "exceptionGenerator"); } ThrowExceptionService();  ThrowExceptionService(ExceptionGenerator eg);  ThrowExceptionService(String uniqueId, ExceptionGenerator eg); void doService(AdaptrisMessage msg); ExceptionGenerator getExceptionGenerator(); void setExceptionGenerator(ExceptionGenerator eg); @Override void prepare();  }