@Test public void testGet() throws Exception { ServletCaller caller = new ServletCaller(); ILoggingEvent e = createEvent("test"); events.add(e); caller.doGet(new LoggingServlet(logging)); ObjectMapper mapper = new ObjectMapper(); @SuppressWarnings("rawtypes") List list = mapper.readValue(caller.getResponseBody(), List.class); assertEquals(1, list.size()); }
@Override protected void get(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { respondWithJson(resp, logging.getRecentLogs()); }
LoggingServlet extends AbstractApiServlet { @Override protected void get(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { respondWithJson(resp, logging.getRecentLogs()); } }
LoggingServlet extends AbstractApiServlet { @Override protected void get(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { respondWithJson(resp, logging.getRecentLogs()); } LoggingServlet(BaleenLogging logging); }
LoggingServlet extends AbstractApiServlet { @Override protected void get(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { respondWithJson(resp, logging.getRecentLogs()); } LoggingServlet(BaleenLogging logging); @Override WebPermission[] getPermissions(); }
LoggingServlet extends AbstractApiServlet { @Override protected void get(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { respondWithJson(resp, logging.getRecentLogs()); } LoggingServlet(BaleenLogging logging); @Override WebPermission[] getPermissions();  }