@Test public void testInit() throws ServletException, IOException { replay(config); replay(context); collectorServlet.init(config); verify(config); verify(context); setUp(); expect(context .getInitParameter(Parameters.PARAMETER_SYSTEM_PREFIX + Parameter.LOG.getCode())) .andReturn(TRUE).anyTimes(); expect(context.getInitParameter( Parameters.PARAMETER_SYSTEM_PREFIX + Parameter.ALLOWED_ADDR_PATTERN.getCode())) .andReturn("127\\.0\\.0\\.1").anyTimes(); replay(config); replay(context); collectorServlet.init(config); verify(config); verify(context); }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); Parameters.initialize(config.getServletContext()); if (!Parameter.LOG.getValueAsBoolean()) { LOGGER.setLevel(Level.WARN); } LOGGER.info("initialization of the collector servlet of the monitoring"); httpAuth = new HttpAuth(); try { collectorServer = new CollectorServer(); } catch (final IOException e) { throw new ServletException(e.getMessage(), e); } }
CollectorServlet extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { super.init(config); Parameters.initialize(config.getServletContext()); if (!Parameter.LOG.getValueAsBoolean()) { LOGGER.setLevel(Level.WARN); } LOGGER.info("initialization of the collector servlet of the monitoring"); httpAuth = new HttpAuth(); try { collectorServer = new CollectorServer(); } catch (final IOException e) { throw new ServletException(e.getMessage(), e); } } }
CollectorServlet extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { super.init(config); Parameters.initialize(config.getServletContext()); if (!Parameter.LOG.getValueAsBoolean()) { LOGGER.setLevel(Level.WARN); } LOGGER.info("initialization of the collector servlet of the monitoring"); httpAuth = new HttpAuth(); try { collectorServer = new CollectorServer(); } catch (final IOException e) { throw new ServletException(e.getMessage(), e); } }  }
CollectorServlet extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { super.init(config); Parameters.initialize(config.getServletContext()); if (!Parameter.LOG.getValueAsBoolean()) { LOGGER.setLevel(Level.WARN); } LOGGER.info("initialization of the collector servlet of the monitoring"); httpAuth = new HttpAuth(); try { collectorServer = new CollectorServer(); } catch (final IOException e) { throw new ServletException(e.getMessage(), e); } }  @Override void init(ServletConfig config); @Override void destroy(); static void addCollectorApplication(String application, String urls); static void removeCollectorApplication(String application); }
CollectorServlet extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { super.init(config); Parameters.initialize(config.getServletContext()); if (!Parameter.LOG.getValueAsBoolean()) { LOGGER.setLevel(Level.WARN); } LOGGER.info("initialization of the collector servlet of the monitoring"); httpAuth = new HttpAuth(); try { collectorServer = new CollectorServer(); } catch (final IOException e) { throw new ServletException(e.getMessage(), e); } }  @Override void init(ServletConfig config); @Override void destroy(); static void addCollectorApplication(String application, String urls); static void removeCollectorApplication(String application);  }