@Test @DisplayName("Survives unreadable properties file") void testFileConfigUnreadable() throws Exception { Assumptions.assumeTrue(SUPPORTS_POSIX, "File system does not support Posix"); Path file = Paths.get("business-parameters.properties"); try { Files.write(file, Collections.singleton("property=testFileConfigUnreadable")); Files.setPosixFilePermissions(file, PosixFilePermissions.fromString("---------")); Configuration config = new ServerConfigurationProvider().getConfiguration(); assertThat(config.getStringParameter("property")).isNotPresent(); } finally { Files.deleteIfExists(file); } }
@Override public Configuration getConfiguration() { return ensureLoadedConfiguration(); }
ServerConfigurationProvider implements ConfigurationProvider { @Override public Configuration getConfiguration() { return ensureLoadedConfiguration(); } }
ServerConfigurationProvider implements ConfigurationProvider { @Override public Configuration getConfiguration() { return ensureLoadedConfiguration(); }  }
ServerConfigurationProvider implements ConfigurationProvider { @Override public Configuration getConfiguration() { return ensureLoadedConfiguration(); }  @Override Configuration getConfiguration(); }
ServerConfigurationProvider implements ConfigurationProvider { @Override public Configuration getConfiguration() { return ensureLoadedConfiguration(); }  @Override Configuration getConfiguration();  }