Configuration { public static Configuration create(Properties properties) { return builder().addProperties(properties).build(); } private  Configuration(File homeDir, Map<String, String> props); FileSystem fileSystem(); Locators locators(); FileLocation getFileLocationOfShared(String relativePath); String getString(String key); String getString(String key, @Nullable String defaultValue); @CheckForNull String getStringByKeys(String... keys); @CheckForNull String getStringByKeys(Predicate<String> validator, String... keys); int getInt(String key, int defaultValue); Map<String, String> asMap(); static Configuration createEnv(); static Configuration create(Properties properties); static Configuration create(Map<String, String> properties); static Configuration create(); static Builder builder();  }
@Test(expected = IllegalStateException.class) public void loadRemotePropertiesFile_fail_if_not_found() throws Exception { MockHttpServer server = new MockHttpServer(); server.start(); server.setMockResponseStatus(404); try { Properties props = new Properties(); props.setProperty("orchestrator.configUrl", "http: Configuration.create(props); } finally { server.stop(); } }