@Test public void start_exception() throws Exception { final Exception exception = new Exception(); server.start(); expectLastCall().andThrow(exception); replayAll(); try { webServer().start(); fail("Expected IOException"); } catch (IOException e) { assertEquals(exception, e.getCause()); } }
public void start() throws IOException { try { server.start(); } catch (Exception e) { LOG.error("Error starting HTTP Server", e); throw new IOException("Unable to start HTTP Server", e); } }
EmbeddedWebServer { public void start() throws IOException { try { server.start(); } catch (Exception e) { LOG.error("Error starting HTTP Server", e); throw new IOException("Unable to start HTTP Server", e); } } }
EmbeddedWebServer { public void start() throws IOException { try { server.start(); } catch (Exception e) { LOG.error("Error starting HTTP Server", e); throw new IOException("Unable to start HTTP Server", e); } } EmbeddedWebServer(int port); private  EmbeddedWebServer(Server server); @VisibleForTesting  EmbeddedWebServer(Server server, Context context); }
EmbeddedWebServer { public void start() throws IOException { try { server.start(); } catch (Exception e) { LOG.error("Error starting HTTP Server", e); throw new IOException("Unable to start HTTP Server", e); } } EmbeddedWebServer(int port); private  EmbeddedWebServer(Server server); @VisibleForTesting  EmbeddedWebServer(Server server, Context context); void start(); boolean isRunning(); void stop(); void waitForShutdown(); }
EmbeddedWebServer { public void start() throws IOException { try { server.start(); } catch (Exception e) { LOG.error("Error starting HTTP Server", e); throw new IOException("Unable to start HTTP Server", e); } } EmbeddedWebServer(int port); private  EmbeddedWebServer(Server server); @VisibleForTesting  EmbeddedWebServer(Server server, Context context); void start(); boolean isRunning(); void stop(); void waitForShutdown();  }