assertThat(bytes.toString(), containsString("Unrecognized command 'bogus-command'"));
}
@Test
public void testCommand() throws Exception {
Command command = mock(Command.class);
when(command.getName()).thenReturn("mock-command");
Main main = new Main(command);
main.run(null, null, null, Lists.newArrayList("mock-command", "arg1", "arg2"));
verify(command).run(null, null, null, Lists.newArrayList("arg1", "arg2"));
}