Proxy extends ProxyServlet { protected void loadProperties() { PropertyLoader.loadProperties(Property.class, "default.properties", "dumonitor.properties"); try { proxyServer = URI.create(Property.QUERY_TURVASERVER_URL.getValue()); } catch (IllegalArgumentException e) { ExceptionUtil.uncheck("Invalid security server URL", e); } }  @Override void init(ServletConfig config);  }
@Test public void testInitServletConfig() throws ServletException { Proxy p = new Proxy(); p.loadProperties(); assertNotNull("Vigane konfiguratsioon", Property.QUERY_TURVASERVER_URL.getValue()); assertNotNull("Proxy serveri URL on NULL", p.proxyServer); assertEquals("Proxy serveri URL pole õige", Property.QUERY_TURVASERVER_URL.getValue(), p.proxyServer.toString()); }