Пример #1
0
 @Override
 @After
 public void stopWebProxy() throws Exception {
   if (server != null) {
     server.getProxyServlet().setUseAuthentication(false);
     server.getProxyServlet().setAuthentications(null);
   }
   super.stopWebProxy();
 }
Пример #2
0
  @Override
  @Before
  public void startWebProxy() throws Exception {
    super.startWebProxy();

    Assert.assertNotNull(server);
    Assert.assertNotNull(server.getProxyServlet());
    server.getProxyServlet().setUseAuthentication(true);
    server.getProxyServlet().getAuthentications().put("admin", "123");
  }