public String test(String... args) throws Exception { Future<TestCommand> future = submitCommand(new TestCommand(), args); try { this.commands.add(future.get(this.timeout, TimeUnit.MILLISECONDS)); return getOutput(); } catch (Exception ex) { return getOutput(); } }
@Test public void noFile() throws Exception { TestCommand command = new TestCommand(); this.thrown.expect(RuntimeException.class); this.thrown.expectMessage("Can't find nothing.groovy"); command.run("nothing.groovy"); }