PropertiesLoader { public Properties load(String name) throws IOException { return load(null, name); }  Properties load(String name); Properties load(ClassLoader classLoader, String name); Properties load(Properties properties, String path, String encoding); Properties load(Properties properties, InputStream inputStream, String encoding);  }
@Test public void testLoad() throws IOException { PropertiesLoader propertiesLoader = new PropertiesLoader(); Properties properties = propertiesLoader.load(System.getProperty("user.dir") + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "light.conf"); assertThat(properties.getProperty("entry_point"), is("main")); }
@Test public void testLoadFromClassPath() throws IOException { PropertiesLoader propertiesLoader = new PropertiesLoader(); Properties properties = propertiesLoader.load(PropertiesLoaderTest.class.getClassLoader(), File.separator + "light.conf"); if (properties.containsKey("entry_point")) { assertThat(properties.getProperty("entry_point"), is("main")); } }