public T addFromMandatoryProperty(Props props, String propertyName) {
    String value = props.nonNullValue(propertyName);
    if (!value.isEmpty()) {
      String splitRegex = " (?=-)";
      List<String> jvmOptions = Arrays.stream(value.split(splitRegex)).map(String::trim).toList();
      checkOptionFormat(propertyName, jvmOptions);
      checkMandatoryOptionOverwrite(propertyName, jvmOptions);
      options.addAll(jvmOptions);
    }

    return castThis();
  }
@Test
  public void addFromMandatoryProperty_checks_against_mandatory_options_is_case_sensitive() {
    String[] optionOverrides = {
      randomPrefix,
      randomPrefix + randomValue.substring(1),
      randomPrefix + randomValue.substring(1),
      randomPrefix + randomValue.substring(2),
      randomPrefix + randomValue.substring(3),
      randomPrefix + randomValue.substring(3) + randomAlphanumeric(1),
      randomPrefix + randomValue.substring(3) + randomAlphanumeric(2),
      randomPrefix + randomValue.substring(3) + randomAlphanumeric(3),
      randomPrefix + randomValue + randomAlphanumeric(1)
    };

    JvmOptions underTest = new JvmOptions(ImmutableMap.of(randomPrefix, randomValue));

    for (String optionOverride : optionOverrides) {
      properties.setProperty(randomPropertyName, optionOverride.toUpperCase(Locale.ENGLISH));
      underTest.addFromMandatoryProperty(new Props(properties), randomPropertyName);
    }
  }