VersionSystemCommand implements SystemCommand { @Override public boolean accept(final ConsoleState state) { Assertions.checkNotNull("state", state); if (state.getActiveCommand() == null && state.getInput().trim().equals("version")) { return true; } return false; }  @Override boolean accept(final ConsoleState state); @Override void execute(final ConsoleReader reader,
                         final PrintWriter out,
                         final ConsoleState state); @Override String getAutoCompleteCommand(); @Override String getCommand(); @Override String getDescription(); @Override String getFileCompletionCommand(); @Override FileCompletionMode getFileCompletionMode(); @Override boolean hasFileCompletion();  }
@Test public void testAcceptInValidParameter() { final ConsoleState state = new ConsoleState(null); state.setInput("xxversion "); assertThat(command.accept(state), is(false)); }
@Test public void testAcceptInValidParameter2() { final ConsoleState state = new ConsoleState(null); state.setInput("add version"); assertThat(command.accept(state), is(false)); }
@Test public void testAcceptInValidParameter3() { final ConsoleState state = new ConsoleState(null); state.setInput("version something"); assertThat(command.accept(state), is(false)); }
@Test(expected = IllegalArgumentException.class) public void testAcceptNull() { assertThat(command.accept(null), is(false)); }
@Test public void testAcceptNullInout() { final ConsoleState state = new ConsoleState(null); state.setInput(null); assertThat(command.accept(state), is(false)); }
@Test public void testAcceptValidParameter() { final ConsoleState state = new ConsoleState(null); state.setInput("version"); assertThat(command.accept(state), is(true)); }
@Test public void testAcceptValidParameter2() { final ConsoleState state = new ConsoleState(null); state.setInput("version "); assertThat(command.accept(state), is(true)); }