UI Unit Testing in a multi-tenancy project

I have one filter that set the schema in my multi-tenancy project.
http.addFilterBefore(new TenantFilter(), UsernamePasswordAuthenticationFilter.class);

So How can I configure the UI unit test to execute that filter when I try to test one view?


What does the filter do?

You could call the function the filter calls before the test

The filter set the schema in my database based on Authentication

protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {

    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    if(authentication != null){
        CustomUserDetails myUser = (CustomUserDetails) authentication.getPrincipal();
    filterChain.doFilter(request, response);

So when I run the test, the user are null and he set the schema do public. but that view, need to get the table on user schema