@Bean
    public LocaleResolver localeResolver() {
        AcceptHeaderLocaleResolver localeResolver = new AcceptHeaderLocaleResolver();
        localeResolver.setDefaultLocale(Locale.US);
        return localeResolver;
    }
@Test
    void resolveLocale_ValidLocaleHeader() {
        LocaleConfig localeConfig = context.getBean(LocaleConfig.class);
        AcceptHeaderLocaleResolver localeResolver = (AcceptHeaderLocaleResolver) localeConfig.localeResolver();
        localeResolver.setSupportedLocales(List.of(Locale.CHINESE, Locale.ENGLISH));

        HttpServletRequest request = mock(HttpServletRequest.class);
        when(request.getLocales()).thenReturn(Collections.enumeration(List.of(Locale.CHINESE, Locale.ENGLISH)));
        Locale resolvedLocale;

        when(request.getHeader("Accept-Language")).thenReturn("zh");
        resolvedLocale = localeResolver.resolveLocale(request);
        assertEquals(Locale.CHINESE, resolvedLocale);

        when(request.getHeader("Accept-Language")).thenReturn("en");
        resolvedLocale = localeResolver.resolveLocale(request);
        assertEquals(Locale.ENGLISH, resolvedLocale);
    }