### Question:
GroovyshCommand implements CliCommand { @Override public int run(@Nonnull ProcessStream process) throws CmdLineException { IO io = new IO(new BufferedInputStream(process.in()), process.out(), process.err()); System.setProperty("jline.inputrc", "~/.no.inputrc"); CONFIG.setupDecorateMethods(); Groovysh groovysh = new Groovysh(this.getClass().getClassLoader(), CONFIG.getDefaultBinding(process, args, runtime), io); groovysh.getImports().addAll(getImports()); configureHistory(process, groovysh); return groovysh.run(""); }  @Override String getName(); @Override String getDescription(); @Override int run(@Nonnull ProcessStream process);  }### Answer:
@Test public void load() { stdin("D.load.threaddump(D.args[0]).threads.size();%n"); run("groovysh", logPath); assertThat(out.toString(), containsString(" 18%n")); assertThat(this, succeeded()); }
@Test public void useInputRuntime() { stdin("D.runtime.threads.size()%n"); run("groovysh", "--in", "threaddump:" + logPath); assertThat(err.toString(), equalTo("")); assertThat(out.toString(), containsString(" 18%n")); assertThat(this, succeeded()); }
@Test public void hasHelp() { run("help", "groovysh"); assertThat(out.toString(), containsString("All Dumpling DSL classes and methods are imported")); }