### Question:
IngOptionalParametersFilter extends HttpFilter { @Override protected void doFilter(HttpServletRequest req, HttpServletResponse res, FilterChain chain) throws IOException, ServletException { IngRequestWrapper request = new IngRequestWrapper(req); chain.doFilter(request, res); }    }### Answer:
@Test void doFilter() throws Exception { ArgumentCaptor<RequestParams> paramsCaptor = ArgumentCaptor.forClass(RequestParams.class); when(accountInformationService.createConsent(any(), paramsCaptor.capture(), any())) .thenThrow(new OAuthException(ResponseHeaders.emptyResponseHeaders(), new ErrorResponse(), "")); mockMvc.perform(post(ConsentController.CONSENTS) .contentType(APPLICATION_JSON_VALUE) .content("{}")) .andExpect(status().is(HttpStatus.FORBIDDEN.value())); RequestParams params = paramsCaptor.getValue(); assertThat(params.toMap()) .containsKey("balanceTypes") .containsKey("limit"); }