public class CommandLineInjectedTest {
@Test
public void commandLineInjected() throws IOException {
try {
Bootstrap bootstrap = new Bootstrap(null);
ApplicationContext ctx = bootstrap.getApplicationContext();
OptionsInjectedDummyCommand dummyCommand = ctx.getBean(OptionsInjectedDummyCommand.class);
Assert.assertNotNull("commandLine was not injected into a command", dummyCommand.getCommandLine());
} catch (RuntimeException t) {
throw t;
} finally {