@Test public void testHappyPath() throws Exception { WarMachine machine = TestHelpers.createWarMachine(WarNames.SERVLET); PathRepo repo = new PathRepoImpl(); (new ServletInspector()).inspect(machine, repo); assertEquals("com.example.servlet.SomeServlet", repo.get("/servlet", HttpMethod.ALL).toString()); assertEquals("com.example.servlet.SomeServlet", repo.get("/servlet2", HttpMethod.ALL).toString()); assertEquals("/index.jsp", repo.get("/index.jsp", HttpMethod.ALL).toString()); assertEquals("/subdir/index.jsp", repo.get("/subdir/index.jsp", HttpMethod.ALL).toString()); assertEquals("/index.html", repo.get("/index.html", HttpMethod.GET).toString()); assertNull(repo.get("/WEB-INF/views/hidden.jsp", HttpMethod.ALL)); }
@Override public void inspect(WarMachine war, PathRepo paths) { logger.info("ServletInspector started"); addServlets(war, paths); addJSPandStaticFiles(war, paths); logger.info("ServletInspector finished"); }
ServletInspector implements Inspector { @Override public void inspect(WarMachine war, PathRepo paths) { logger.info("ServletInspector started"); addServlets(war, paths); addJSPandStaticFiles(war, paths); logger.info("ServletInspector finished"); } }
ServletInspector implements Inspector { @Override public void inspect(WarMachine war, PathRepo paths) { logger.info("ServletInspector started"); addServlets(war, paths); addJSPandStaticFiles(war, paths); logger.info("ServletInspector finished"); }  }
ServletInspector implements Inspector { @Override public void inspect(WarMachine war, PathRepo paths) { logger.info("ServletInspector started"); addServlets(war, paths); addJSPandStaticFiles(war, paths); logger.info("ServletInspector finished"); }  @Override void inspect(WarMachine war, PathRepo paths); }
ServletInspector implements Inspector { @Override public void inspect(WarMachine war, PathRepo paths) { logger.info("ServletInspector started"); addServlets(war, paths); addJSPandStaticFiles(war, paths); logger.info("ServletInspector finished"); }  @Override void inspect(WarMachine war, PathRepo paths);  }