public String nonNullValue(String key) {
    String value = value(key);
    if (value == null) {
      throw new IllegalArgumentException("Missing property: " + key);
    }
    return value;
  }
@Test
  public void nonNullValue_throws_IAE_on_non_existing_key() {
    Props props = new Props(new Properties());

    assertThatThrownBy(() -> props.nonNullValue("other"))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Missing property: other");
  }