class SecurityConfig {

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {<FILL_FUNCTION_BODY>}

    @Bean
    public UserDetailsService userDetailsService() {
        InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
        manager.createUser(User.withUsername("test").password("{noop}test")
                .roles("ADMIN", "TEST").build());
        manager.createUser(User.withUsername("root").password("{noop}root")
                .roles("ADMIN").build());
        return manager;
    }

}

        return http.authorizeHttpRequests((authorize) -> {
                    authorize.requestMatchers("/test/**").hasRole("TEST")
                            .requestMatchers("/**").permitAll();
                })
                .logout().logoutSuccessUrl("/")
                .and().formLogin(withDefaults())
                .build();
    
<no_super_class>