static SonarEdition parseEdition(String edition) {
    String str = trimToEmpty(edition.toUpperCase(Locale.ENGLISH));
    try {
      return SonarEdition.valueOf(str);
    } catch (IllegalArgumentException e) {
      throw new IllegalStateException(format("Invalid edition found in '%s': '%s'", EDITION_FILE_PATH, str));
    }
  }
@Test
  void throw_ISE_if_edition_is_invalid() {
    assertThatThrownBy(() -> MetadataLoader.parseEdition("trash"))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Invalid edition found in '/sonar-edition.txt': 'TRASH'");
  }