public static CommandTesterImpl<?> create(Class<?> commandClass, AddonRegistry addonRegistry,
Resource<?>... initialSelection) throws Exception
{
Imported<UIContextListener> listeners = addonRegistry.getServices(UIContextListener.class);
UISelection<Resource<?>> selection = Selections.from(initialSelection);
UIContextImpl context = new UIContextImpl(new UIProviderImpl(true), listeners, selection);
return new CommandTesterImpl(commandClass, addonRegistry, context);
}