public static String checkComponentQualifier(String qualifier) {
    checkArgument(!isNullOrEmpty(qualifier), "Component qualifier can't be empty");
    checkArgument(qualifier.length() <= MAX_COMPONENT_QUALIFIER_LENGTH, "Component qualifier length (%s) is longer than the maximum authorized (%s). '%s' was provided.",
      qualifier.length(), MAX_COMPONENT_QUALIFIER_LENGTH, qualifier);
    return qualifier;
  }
@Test
  void fail_when_qualifier_is_longer_than_10_characters() {
    assertThatThrownBy(() -> ComponentValidator.checkComponentQualifier(repeat("a", 10 + 1)))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessageContaining("Component qualifier length");
  }