AdvancedMessageSplitterService extends MessageSplitterServiceImp implements EventHandlerAware, ServiceWrapper { public void setSendEvents(Boolean b) { sendEvents = b; } AdvancedMessageSplitterService(); @Override void start(); @Override void stop(); Service getService(); void setService(Service sc); Boolean getSendEvents(); boolean sendEvents(); void setSendEvents(Boolean b); @Override void registerEventHandler(EventHandler eh); @Override void prepare(); @Override Service[] wrappedServices();  }
@Test public void testSetSendEvents() throws Exception { AdvancedMessageSplitterService service = createForTests(); assertNull(service.getSendEvents()); assertFalse(service.sendEvents()); service.setSendEvents(Boolean.TRUE); assertNotNull(service.getSendEvents()); assertEquals(Boolean.TRUE, service.getSendEvents()); assertTrue(service.sendEvents()); service.setSendEvents(null); assertNull(service.getSendEvents()); assertFalse(service.sendEvents()); }