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_fails_with_IAE_if_property_does_not_exist() {
    expectMissingPropertyIAE(() -> underTest.addFromMandatoryProperty(new Props(properties), this.randomPropertyName), this.randomPropertyName);
  }