### Question:
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();  }### Answer:
@Test public void start() throws Exception { server.start(); replayAll(); webServer().start(); }
@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()); } }