### Question:
WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } }  @Provides HttpServer httpServer(); int port(); void stop(); void joinThread(); @Provides Configuration conf(); String name(); @Override void configureServlets(); void route(HTTP method, String pathSpec,
                    Class<? extends Controller> cls, String action); void route(String pathSpec, Class<? extends Controller> cls,
                    String action); void route(String pathSpec, Class<? extends Controller> cls); abstract void setup();  }### Answer:
@Test public void testCreate() { WebApp app = WebApps.$for(this).start(); app.stop(); }
@Test public void testDefaultRoutes() throws Exception { WebApp app = WebApps.$for("test", this).start(); String baseUrl = baseUrl(app); try { assertEquals("foo", getContent(baseUrl +"test/foo").trim()); assertEquals("foo", getContent(baseUrl +"test/foo/index").trim()); assertEquals("bar", getContent(baseUrl +"test/foo/bar").trim()); assertEquals("default", getContent(baseUrl +"test").trim()); assertEquals("default", getContent(baseUrl +"test/").trim()); assertEquals("default", getContent(baseUrl).trim()); } finally { app.stop(); } }