@Test public void testDoService() throws Exception { Cache mockCache = Mockito.mock(Cache.class); CacheConnection cache = new CacheConnection(mockCache); ClearCacheService service = new ClearCacheService().withConnection(cache); ExampleServiceCase.execute(service, AdaptrisMessageFactory.getDefaultInstance().newMessage()); }
@Override public void doService(AdaptrisMessage msg) throws ServiceException { try { retrieveCache().clear(); } catch (CoreException e) { throw ExceptionHelper.wrapServiceException(e); } catch (UnsupportedOperationException e) { if (!quietly()) { throw ExceptionHelper.wrapServiceException(e); } } }
ClearCacheService extends CacheServiceImpl { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { retrieveCache().clear(); } catch (CoreException e) { throw ExceptionHelper.wrapServiceException(e); } catch (UnsupportedOperationException e) { if (!quietly()) { throw ExceptionHelper.wrapServiceException(e); } } } }
ClearCacheService extends CacheServiceImpl { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { retrieveCache().clear(); } catch (CoreException e) { throw ExceptionHelper.wrapServiceException(e); } catch (UnsupportedOperationException e) { if (!quietly()) { throw ExceptionHelper.wrapServiceException(e); } } }  }
ClearCacheService extends CacheServiceImpl { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { retrieveCache().clear(); } catch (CoreException e) { throw ExceptionHelper.wrapServiceException(e); } catch (UnsupportedOperationException e) { if (!quietly()) { throw ExceptionHelper.wrapServiceException(e); } } }  @Override void doService(AdaptrisMessage msg); Boolean getIgnoreUnsupported(); void setIgnoreUnsupported(Boolean b); ClearCacheService withIgnoreUnsupported(Boolean s); }
ClearCacheService extends CacheServiceImpl { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { retrieveCache().clear(); } catch (CoreException e) { throw ExceptionHelper.wrapServiceException(e); } catch (UnsupportedOperationException e) { if (!quietly()) { throw ExceptionHelper.wrapServiceException(e); } } }  @Override void doService(AdaptrisMessage msg); Boolean getIgnoreUnsupported(); void setIgnoreUnsupported(Boolean b); ClearCacheService withIgnoreUnsupported(Boolean s);  }