### Question:
WorkItemDefinitionStandaloneClientService implements WorkItemDefinitionClientService { @Override public Promise<Collection<WorkItemDefinition>> call(final Metadata input) { return loader; } @Inject  WorkItemDefinitionStandaloneClientService(final Promises promises,
                                                     final WorkItemDefinitionCacheRegistry registry,
                                                     final ResourceContentService resourceContentService,
                                                     final WorkItemIconCache workItemIconCache); @PostConstruct void init(); @Produces @Default @Override WorkItemDefinitionRegistry getRegistry(); @Override Promise<Collection<WorkItemDefinition>> call(final Metadata input); @PreDestroy void destroy();  }### Answer:
@Test public void testNoWorkItemsLoadPreset() { tested = new WorkItemDefinitionStandaloneClientService(promises, registry, new ResourceContentService() { @Override public Promise<String> get(String uri) { return promises.resolve(); } @Override public Promise<String> get(String uri, ResourceContentOptions options) { return get(uri); } @Override public Promise<String[]> list(String pattern) { return promises.resolve(new String[0]); } @Override public Promise<String[]> list(String pattern, ResourceListOptions options) { return promises.resolve(new String[0]); } }, new WorkItemIconCacheImpl(new BPMNStaticResourceContentService(promises))); call(); assertEquals(1, registry.items().size()); }
@Test public void testEmptyWorkItemsLoadPreset() { tested = new WorkItemDefinitionStandaloneClientService(promises, registry, new ResourceContentService() { @Override public Promise<String> get(String uri) { return promises.resolve(); } @Override public Promise<String> get(String uri, ResourceContentOptions options) { return get(uri); } @Override public Promise<String[]> list(String pattern) { return promises.resolve(new String[]{""}); } @Override public Promise<String[]> list(String pattern, ResourceListOptions options) { return promises.resolve(new String[0]); } }, new WorkItemIconCacheImpl(new BPMNStaticResourceContentService(promises))); call(); assertEquals(1, registry.items().size()); }