AddToCacheService extends CacheServiceBase { public boolean enforceSerializable() { return BooleanUtils.toBooleanDefaultIfNull(getEnforceSerializable(), false); } AddToCacheService(); @Override void doService(AdaptrisMessage msg); void setEnforceSerializable(Boolean bool); Boolean getEnforceSerializable(); boolean enforceSerializable();  }
@Test public void testEnforceSerializable() throws Exception { AddToCacheService service = createService(); assertNull(service.getEnforceSerializable()); assertFalse(service.enforceSerializable()); service.setEnforceSerializable(Boolean.TRUE); assertEquals(true, service.enforceSerializable()); assertTrue(service.getEnforceSerializable()); service.setEnforceSerializable(null); assertNull(service.getEnforceSerializable()); assertFalse(service.enforceSerializable()); }