<div dir="ltr">Hi everybody,<div><br></div><div>Believe it or not, but I resumed my work on the Servlet Security addon for Forge (<a href="https://issues.jboss.org/browse/FORGEPLUGINS-152" target="_blank">https://issues.jboss.org/browse/FORGEPLUGINS-152</a>) :)</div><div><br></div><div>And I found something that I don&#39;t know whether is a bug or a feature. If my Command class implements the PrerequisiteCommandsProvider and if I try to use the CommandController in my integration test, then I have a problem. Here is a sample code:</div><div><br></div><div><div>try (CommandController commandController = testHarness</div><div>               .createCommandController(SecuritySetupCommand.class, project.getRoot()))</div><div>      {</div><div>         commandController.initialize();</div><div>         commandController.setValueFor(&quot;securityRealm&quot;, realm);</div><div>         commandController.setValueFor(&quot;authMethod&quot;, authenticationMethod);</div><div>         commandController.execute();</div><div>      }</div></div><div><br></div><div>This code fails at the setValueFor method simply because the UI was not initialized in the initialize method above it and there are no such inputs like securityRealm and authMethod.</div><div><br></div><div>I did some debugging and found that if SecuritySetupCommand implements the PrerequisiteCommandsProvider interface, the commandController.initialize() method does not call PrerequisiteCommandsProvider#initializeUI method. Instead it triggeres PrerequisiteCommandTransformer.DelegateWizard#initializeUI. Which is empty and does nothing. And that&#39;s the reason why there are no securityRealm and authMethod controls.</div><div><br></div><div>I guess that it is caused by some CDI &quot;magic&quot;? So I wonder is it a bug or a feature? Can I use CommandController to test commands that implement PrerequisiteCommandsProvider?</div><div><br></div><div>Thanks,</div><div>Ivan</div></div>