public File nonNullValueAsFile(String key) {
    String s = value(key);
    if (s == null) {
      throw new IllegalArgumentException("Property " + key + " is not set");
    }
    return new File(s);
  }
@Test
  public void nonNullValueAsFile() throws IOException {
    File file = temp.newFile();
    Props props = new Props(new Properties());
    props.set("path", file.getAbsolutePath());

    assertThat(props.nonNullValueAsFile("path")).isEqualTo(file);

    try {
      props.nonNullValueAsFile("other_path");
      fail();
    } catch (IllegalArgumentException e) {
      assertThat(e).hasMessage("Property other_path is not set");
    }
  }