BootstrapTools { public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } } private  BootstrapTools(); static ActorSystem startActorSystem(
			Configuration configuration,
			String listeningAddress,
			String portRangeDefinition,
			Logger logger); static ActorSystem startActorSystem(
				Configuration configuration,
				String listeningAddress,
				int listeningPort,
				Logger logger); static WebMonitor startWebMonitorIfConfigured(
			Configuration config,
			HighAvailabilityServices highAvailabilityServices,
			LeaderGatewayRetriever<JobManagerGateway> jobManagerRetriever,
			MetricQueryServiceRetriever queryServiceRetriever,
			Time timeout,
			ScheduledExecutor scheduledExecutor,
			Logger logger); static Configuration generateTaskManagerConfiguration(
				Configuration baseConfig,
				String jobManagerHostname,
				int jobManagerPort,
				int numSlots,
				FiniteDuration registrationTimeout); static void writeConfiguration(Configuration cfg, File file); static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated); static void substituteDeprecatedConfigPrefix(
			Configuration config,
			String deprecatedPrefix,
			String designatedPrefix); static Option newDynamicPropertiesOption(); static Configuration parseDynamicProperties(CommandLine cmd); static String getTaskManagerShellCommand(
			Configuration flinkConfig,
			ContaineredTaskManagerParameters tmParams,
			String configDirectory,
			String logDirectory,
			boolean hasLogback,
			boolean hasLog4j,
			boolean hasKrb5,
			Class<?> mainClass); static String getStartCommand(String template,
		Map<String, String> startCommandValues);  }
@Test public void testSubstituteConfigKey() { String deprecatedKey1 ="deprecated-key"; String deprecatedKey2 ="another-out_of-date_key"; String deprecatedKey3 ="yet-one-more"; String designatedKey1 ="newkey1"; String designatedKey2 ="newKey2"; String designatedKey3 ="newKey3"; String value1 = "value1"; String value2_designated = "designated-value2"; String value2_deprecated = "deprecated-value2"; Configuration cfg = new Configuration(); cfg.setString(deprecatedKey1, value1); cfg.setString(deprecatedKey2, value2_deprecated); cfg.setString(designatedKey2, value2_designated); BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey1, designatedKey1); BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey2, designatedKey2); BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey3, designatedKey3); assertEquals(value1, cfg.getString(designatedKey1, null)); assertEquals(value2_designated, cfg.getString(designatedKey2, null)); assertNull(cfg.getString(designatedKey3, null)); assertNull(cfg.getString(deprecatedKey3, null)); }