static List<Locale> negotiatePreferredLocales(String headerValue) {

    if (headerValue == null || headerValue.isBlank()) {
      headerValue = DEFAULT_LOCALE.toLanguageTag();
    }

    try {
      var languageRanges = Locale.LanguageRange.parse(headerValue);
      return Locale.filter(languageRanges, supportedLocales);
    } catch (IllegalArgumentException e) {
      throw new ValidationException(new Message("error.unparsableHeader"));
    }
  }
@Test
  void test_mockMultipleRequestWithZeroLoadTimeForSupportedLocale() {

    var startTime = System.currentTimeMillis();
    LocaleUtils.negotiatePreferredLocales("de-DE,de,en,it;q=0.5");
    var endTime = System.currentTimeMillis();
    var executionTime = endTime - startTime;

    assertThat(executionTime, lessThanOrEqualTo(1L));

    // Mock second request
    startTime = System.currentTimeMillis();
    LocaleUtils.negotiatePreferredLocales("de-DE;q=0.8,en-US;q=0.9,de,en,it;q=0.5");
    endTime = System.currentTimeMillis();
    executionTime = endTime - startTime;
    assertThat(executionTime, lessThanOrEqualTo(1L));
  }