DDConfigUpdater { public boolean isValidWorkitem(String name, String value) { return name != null && name.trim().length() > 0 && value != null && value.trim().length() > 0; } DDConfigUpdater(); @Inject  DDConfigUpdater(DDEditorService ddEditorService,
                           KieModuleService moduleService,
                           DDConfigUpdaterHelper configUpdaterHelper); void processResourceAdd(@Observes final ResourceAddedEvent resourceAddedEvent); void processResourceUpdate(@Observes final ResourceUpdatedEvent resourceUpdatedEvent); void processWorkitemInstall(@Observes final DesignerWorkitemInstalledEvent workitemInstalledEvent); void processServiceTaskEvent(@Observes final ServiceTaskResourceEvent serviceResourceEvent); String parseWorkitemValue(String value); String getWorkitemResolver(String value,
                                      String defaultResolver); boolean isValidWorkitem(String name, String value);  }
@Test public void testIsValidWorkitem() { assertFalse(ddConfigUpdater.isValidWorkitem(null, null)); assertFalse(ddConfigUpdater.isValidWorkitem("", "")); assertFalse(ddConfigUpdater.isValidWorkitem("new com.myhandlers.MyHandler()", "") ); assertFalse(ddConfigUpdater.isValidWorkitem("", "MyHandler") ); assertTrue(ddConfigUpdater.isValidWorkitem("MyHandler", "new com.myhandlers.MyHandler()" )); }