CommandContextFactory { public static CommandContext newInstance(String commandName){ return new CommandContext(commandName); }  static CommandContext newInstance(String commandName); static CommandContext newInstance(String commandName, String[] args,boolean isHttp);  }
@Test public void testNewInstance() throws Exception { CommandContext context = CommandContextFactory.newInstance("test"); assertThat(context.getCommandName(), equalTo("test")); context = CommandContextFactory.newInstance("command", new String[]{"hello"}, true); assertThat(context.getCommandName(), equalTo("command")); assertThat(context.getArgs(), Matchers.arrayContaining("hello")); assertTrue(context.isHttp()); }