@Test @DisplayName("Provides configuration from properties file on classpath") void testClasspathConfig() { String pathPrefix = this.getClass().getName().replace('.', '/') + "/testClasspathConfig/"; ClassLoader original = Thread.currentThread().getContextClassLoader(); try { UnaryOperator<String> rewrite = resource -> pathPrefix + resource; Thread.currentThread().setContextClassLoader(rewriteResourceLoader(original, rewrite)); Configuration config = new ServerConfigurationProvider().getConfiguration(); assertThat(config.getStringParameter("property")).hasValue("testClasspathConfig"); } finally { Thread.currentThread().setContextClassLoader(original); } }
@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();  }