Code review comment: After we removing this new added part, we never have the reusing issue. And the previous ones were not in the scope of this PR. :)

Code under review:
public void testGetJobManagerStartCommand() {
		final Configuration cfg = new Configuration();

		final String jmJvmOpts = "-DjmJvm";
		final int jmMemoryAfterCutoff = BootstrapTools.calculateHeapSize(jobManagerMem, cfg);
		final String jmJvmMem = String.format("-Xms%dm -Xmx%dm", jmMemoryAfterCutoff, jmMemoryAfterCutoff);

		assertEquals(
			getJobManagerExpectedCommand(jmJvmMem, "", "", mainClassArgs),
			getJobManagerStartCommand(cfg, false, false, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand(jmJvmMem, "", logback, mainClassArgs),
			getJobManagerStartCommand(cfg, true, false, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand(jmJvmMem, "", log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, false, true, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand(jmJvmMem, "", logback + " " + log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		
		cfg.setString(CoreOptions.FLINK_JVM_OPTIONS, jvmOpts);
		assertEquals(
			getJobManagerExpectedCommand(jmJvmMem, jvmOpts, logback + " " + log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		
		cfg.setString(CoreOptions.FLINK_JM_JVM_OPTIONS, jmJvmOpts);
		assertEquals(
			getJobManagerExpectedCommand(jmJvmMem, jvmOpts + " " + jmJvmOpts, logback + " " + log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand(jmJvmMem, jvmOpts + " " + jmJvmOpts, logback + " " + log4j, ""),
			getJobManagerStartCommand(cfg, true, true, ""));

		

		cfg.setString(KubernetesConfigOptions.CONTAINER_START_COMMAND_TEMPLATE,
			"%java% 1 %classpath% 2 %jvmmem% %jvmopts% %logging% %class% %args% %redirects%");
		assertEquals(
			java + " 1 " + classpath + " 2 " + jmJvmMem +
				" " + jvmOpts + " " + jmJvmOpts + 
				" " + jmLogfile + " " + logback + " " + log4j +
				" " + mainClass + " " + mainClassArgs + " " + jmLogRedirects,
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		cfg.setString(KubernetesConfigOptions.CONTAINER_START_COMMAND_TEMPLATE,
			"%java% %jvmmem% %logging% %jvmopts% %class% %args% %redirects%");
		assertEquals(
			java + " " + jmJvmMem +
				" " + jmLogfile + " " + logback + " " + log4j +
				" " + jvmOpts + " " + jmJvmOpts + 
				" " + mainClass + " " + mainClassArgs + " " + jmLogRedirects,
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		cfg.setInteger(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN, 300);
		final int jmMemoryAfterNewCutoff = BootstrapTools.calculateHeapSize(jobManagerMem, cfg);
		final String jmJvmMemNew = String.format("-Xms%dm -Xmx%dm", jmMemoryAfterNewCutoff, jmMemoryAfterNewCutoff);
		assertEquals(
			java + " " + jmJvmMemNew +
				" " + jmLogfile + " " + logback + " " + log4j +
				" " + jvmOpts + " " + jmJvmOpts + 
				" " + mainClass + " " + mainClassArgs + " " + jmLogRedirects,
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));
	}

Line commented on: cfg.setInteger(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN, 300);

Revised code:
public void testGetJobManagerStartCommand() {
		final Configuration cfg = new Configuration();

		final String jmJvmOpts = "-DjmJvm";

		assertEquals(
			getJobManagerExpectedCommand("", "", mainClassArgs),
			getJobManagerStartCommand(cfg, false, false, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand("", logback, mainClassArgs),
			getJobManagerStartCommand(cfg, true, false, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand("", log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, false, true, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand("", logback + " " + log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		
		cfg.setString(CoreOptions.FLINK_JVM_OPTIONS, jvmOpts);
		assertEquals(
			getJobManagerExpectedCommand(jvmOpts, logback + " " + log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		
		cfg.setString(CoreOptions.FLINK_JM_JVM_OPTIONS, jmJvmOpts);
		assertEquals(
			getJobManagerExpectedCommand(jvmOpts + " " + jmJvmOpts, logback + " " + log4j, mainClassArgs),
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		
		assertEquals(
			getJobManagerExpectedCommand(jvmOpts + " " + jmJvmOpts, logback + " " + log4j, ""),
			getJobManagerStartCommand(cfg, true, true, ""));

		

		cfg.setString(KubernetesConfigOptions.CONTAINER_START_COMMAND_TEMPLATE,
			"%java% 1 %classpath% 2 %jvmmem% %jvmopts% %logging% %class% %args% %redirects%");
		assertEquals(
			java + " 1 " + classpath + " 2 " + jmJvmMem +
				" " + jvmOpts + " " + jmJvmOpts + 
				" " + jmLogfile + " " + logback + " " + log4j +
				" " + mainClass + " " + mainClassArgs + " " + jmLogRedirects,
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

		cfg.setString(KubernetesConfigOptions.CONTAINER_START_COMMAND_TEMPLATE,
			"%java% %jvmmem% %logging% %jvmopts% %class% %args% %redirects%");
		assertEquals(
			java + " " + jmJvmMem +
				" " + jmLogfile + " " + logback + " " + log4j +
				" " + jvmOpts + " " + jmJvmOpts + 
				" " + mainClass + " " + mainClassArgs + " " + jmLogRedirects,
			getJobManagerStartCommand(cfg, true, true, mainClassArgs));

	}