public static ParameterTool fromPropertiesFile(String path) throws IOException {
        File propertiesFile = new File(path);
        return fromPropertiesFile(propertiesFile);
    }
@Test
    void testFromPropertiesFile(@TempDir File propertiesFile) throws IOException {
        Properties props = new Properties();
        props.setProperty("input", "myInput");
        props.setProperty("expectedCount", "15");
        Path path = new File(propertiesFile, UUID.randomUUID().toString()).toPath();
        try (final OutputStream out = Files.newOutputStream(path)) {
            props.store(out, "Test properties");
        }
        ParameterTool parameter = ParameterTool.fromPropertiesFile(path.toFile());
        assertThat(parameter.getNumberOfParameters()).isEqualTo(2);
        validate(parameter);

        parameter = ParameterTool.fromPropertiesFile(path.toFile());
        assertThat(parameter.getNumberOfParameters()).isEqualTo(2);
        validate(parameter);

        try (FileInputStream fis = new FileInputStream(path.toFile())) {
            parameter = ParameterTool.fromPropertiesFile(fis);
        }
        assertThat(parameter.getNumberOfParameters()).isEqualTo(2);
        validate(parameter);
    }