I have a ProxyServlet (org.mitre.dsmiley.httpproxy) in my code which does some operations and forwards certain url's ending with */xyz to a different application. I have integration tests covering my application( using JerseyTest framework) and want to make the integration-tests pass through the proxy servlet.
Currently my test case deployment configuration is as below:
ServletDeploymentContext.forServlet(new ServletContainer(internalConfigureResourceConfig(resourceConfig))).build()
Now, to test my proxy-servlet, if I change the configuration as below,
ServletDeploymentContext.forServlet(MyProxyServlet.class).build()
I am not able to add the url-pattern servlet-mapping above and the proxy-servlet is being called for all the url's. Can someone tell me how can I add the url-mapping configuration dynamically for the
ServletDeploymentContext.forServlet
I have checked all the methods but unable to do so