RetrieveFromCacheService extends CacheServiceBase { public void setExceptionIfNotFound(Boolean b) { exceptionIfNotFound = b; } RetrieveFromCacheService(); @Override void doService(AdaptrisMessage msg); Boolean getExceptionIfNotFound(); void setExceptionIfNotFound(Boolean b);  }
@Test public void testSetExceptionIfNotFound() { RetrieveFromCacheService service = createServiceForTests(); assertNull(service.getExceptionIfNotFound()); assertEquals(true, service.exceptionIfNotFound()); service.setExceptionIfNotFound(Boolean.FALSE); assertEquals(false, service.exceptionIfNotFound()); service.setExceptionIfNotFound(null); assertNull(service.getExceptionIfNotFound()); assertEquals(true, service.exceptionIfNotFound()); }