NinjaConsole extends AbstractConsole<NinjaConsole> { @Override public Injector getInjector() { checkStarted(); return this.bootstrap.getInjector(); } NinjaConsole(); static void main(String [] args); @Override Injector getInjector(); @Override void doConfigure(); @Override void doStart(); @Override void doShutdown();  }
@Test public void start() throws Exception { NinjaConsole console = new NinjaConsole(); try { console.getInjector(); fail("exception expected"); } catch (IllegalStateException e) { assertThat(e.getMessage(), containsString("start() not called")); } console.start(); try { assertThat(console.getInjector(), is(not(nullValue()))); } finally { console.shutdown(); } }