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?

tks

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

@Override
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();
        TenantContext.setCurrentTenant("db_"+myUser.getSchema());
    }else{
        TenantContext.setCurrentTenant(TenantContext.DEFAULT_TENANT);
    }
    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

https://vaadin.com/docs/latest/testing/ui-unit/spring#testing-with-spring-security