@Before public void before() throws Exception { this.restQueryFilter = new RestQueryFilter(); this.restQueryFilter.setHttpUtils(new HttpUtils()); this.chain = mock(Chain.class); this.xmlUtils = mock(XmlUtils.class); this.restQueryFilter.setXmlUtils(this.xmlUtils); this.wsSecurityHandler = mock(WSSecurityHandler.class); this.restQueryFilter.setWSSecurityHandler(wsSecurityHandler); this.soapRequestFactory = mock(SoapRequestFactory.class); this.restQueryFilter.setSoapRequestFactory(this.soapRequestFactory); this.soapEnvelopeUtils = mock(SoapEnvelopeUtils.class); this.restQueryFilter.setSoapEnvelopeUtils(this.soapEnvelopeUtils); this.queryParameterUtils = mock(QueryParameterUtils.class); this.restQueryFilter.setQueryParameterUtils(this.queryParameterUtils); this.awsQuerySecurityHandler = mock(AwsQuerySecurityHandler.class); this.restQueryFilter.setAwsQuerySecurityHandler(this.awsQuerySecurityHandler); }
@Override public void doFilter(HttpExchange exchange, Chain chain) throws IOException { parseGetParameters(exchange); parsePostParameters(exchange); chain.doFilter(exchange); }