@Test public void existentFile() throws Exception { File file = File.createTempFile("lightbend", "test"); String content = "a = 1"; Files.write(file.toPath(), content.getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE); assertThat(loader.load(file).get(new IntegerProperty("a"))).isEqualTo(1); file.deleteOnExit(); }
@Override public Configuration load(File file) throws FileNotFoundException { if (!file.exists()) { throw new FileNotFoundException("The given file does not exist"); } return new LightbendConfiguration(ConfigFactory.parseFile(file)); }
LightbendConfigurationLoader implements ConfigurationLoader { @Override public Configuration load(File file) throws FileNotFoundException { if (!file.exists()) { throw new FileNotFoundException("The given file does not exist"); } return new LightbendConfiguration(ConfigFactory.parseFile(file)); } }
LightbendConfigurationLoader implements ConfigurationLoader { @Override public Configuration load(File file) throws FileNotFoundException { if (!file.exists()) { throw new FileNotFoundException("The given file does not exist"); } return new LightbendConfiguration(ConfigFactory.parseFile(file)); }  }
LightbendConfigurationLoader implements ConfigurationLoader { @Override public Configuration load(File file) throws FileNotFoundException { if (!file.exists()) { throw new FileNotFoundException("The given file does not exist"); } return new LightbendConfiguration(ConfigFactory.parseFile(file)); }  @Override Configuration load(File file); @Override Configuration load(InputStream input); }
LightbendConfigurationLoader implements ConfigurationLoader { @Override public Configuration load(File file) throws FileNotFoundException { if (!file.exists()) { throw new FileNotFoundException("The given file does not exist"); } return new LightbendConfiguration(ConfigFactory.parseFile(file)); }  @Override Configuration load(File file); @Override Configuration load(InputStream input);  }