### Question:
BootstrapTools { public static void updateTmpDirectoriesInConfiguration( Configuration configuration, @Nullable String defaultDirs) { if (configuration.contains(CoreOptions.TMP_DIRS)) { LOG.info("Overriding Fink's temporary file directories with those " + "specified in the Flink config: {}", configuration.getValue(CoreOptions.TMP_DIRS)); } else if (defaultDirs != null) { LOG.info("Setting directories for temporary files to: {}", defaultDirs); configuration.setString(CoreOptions.TMP_DIRS, defaultDirs); configuration.setBoolean(USE_LOCAL_DEFAULT_TMP_DIRS, true); } } private  BootstrapTools(); static ActorSystem startActorSystem(
		Configuration configuration,
		String listeningAddress,
		String portRangeDefinition,
		Logger logger); static ActorSystem startActorSystem(
			Configuration configuration,
			String listeningAddress,
			String portRangeDefinition,
			Logger logger,
			@Nonnull ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
			Configuration configuration,
			String actorSystemName,
			String listeningAddress,
			String portRangeDefinition,
			Logger logger,
			@Nonnull ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
		Configuration configuration,
		String listeningAddress,
		int listeningPort,
		Logger logger); static ActorSystem startActorSystem(
				Configuration configuration,
				String listeningAddress,
				int listeningPort,
				Logger logger,
				ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
		Configuration configuration,
		String actorSystemName,
		String listeningAddress,
		int listeningPort,
		Logger logger,
		ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); 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); static void updateTmpDirectoriesInConfiguration(
			Configuration configuration,
			@Nullable String defaultDirs); static Configuration cloneConfiguration(Configuration configuration);  }### Answer:
@Test public void testUpdateTmpDirectoriesInConfiguration() { Configuration config = new Configuration(); BootstrapTools.updateTmpDirectoriesInConfiguration(config, "default/directory/path"); assertEquals(config.getString(CoreOptions.TMP_DIRS), "default/directory/path"); BootstrapTools.updateTmpDirectoriesInConfiguration(config, "not/default/directory/path"); assertEquals(config.getString(CoreOptions.TMP_DIRS), "default/directory/path"); config.setString(CoreOptions.TMP_DIRS, ""); BootstrapTools.updateTmpDirectoriesInConfiguration(config, "some/new/path"); assertEquals(config.getString(CoreOptions.TMP_DIRS), ""); }
@Test public void testShouldNotUpdateTmpDirectoriesInConfigurationIfNoValueConfigured() { Configuration config = new Configuration(); BootstrapTools.updateTmpDirectoriesInConfiguration(config, null); assertEquals(config.getString(CoreOptions.TMP_DIRS), CoreOptions.TMP_DIRS.defaultValue()); }