@Test public void testLoadProperties_WithAvailableConfigFile_ReturnsLoadedConfigFile() throws IOException { Files.write(this.regularFile.toPath(), this.sampleConfigFile.getBytes(), StandardOpenOption.APPEND); Properties prop = FileUtil.loadProperties(this.regularFile.getAbsolutePath()); Assert.assertEquals("Different size of loaded properties file", 4, prop.size()); Assert.assertEquals("Improper value obtained from properties", "8666", prop.getProperty("server.port")); Assert.assertEquals("Improper value obtained from properties", "true", prop.getProperty("devMode")); Assert.assertEquals("Improper value obtained from properties", "0", prop.getProperty("server.reboots")); Assert.assertEquals("Improper value obtained from properties", "AUTO_SERVER=TRUE;", prop.getProperty("h2db.connection.url.extraArgs")); }
public static Properties loadProperties(String propertiesFilePath) throws IOException { Properties prop = new Properties(); try (FileInputStream fileInputStream = new FileInputStream(propertiesFilePath)) { prop.load(fileInputStream); } return prop; }
FileUtil { public static Properties loadProperties(String propertiesFilePath) throws IOException { Properties prop = new Properties(); try (FileInputStream fileInputStream = new FileInputStream(propertiesFilePath)) { prop.load(fileInputStream); } return prop; } }
FileUtil { public static Properties loadProperties(String propertiesFilePath) throws IOException { Properties prop = new Properties(); try (FileInputStream fileInputStream = new FileInputStream(propertiesFilePath)) { prop.load(fileInputStream); } return prop; }  }
FileUtil { public static Properties loadProperties(String propertiesFilePath) throws IOException { Properties prop = new Properties(); try (FileInputStream fileInputStream = new FileInputStream(propertiesFilePath)) { prop.load(fileInputStream); } return prop; }  static File[] getFileListFromDirectory(String directory); static Properties loadProperties(String propertiesFilePath); }
FileUtil { public static Properties loadProperties(String propertiesFilePath) throws IOException { Properties prop = new Properties(); try (FileInputStream fileInputStream = new FileInputStream(propertiesFilePath)) { prop.load(fileInputStream); } return prop; }  static File[] getFileListFromDirectory(String directory); static Properties loadProperties(String propertiesFilePath);  }