Source:
<code>public void testUpdateClusterCommands() throws Exception { FalconCLI.OUT.set(stream); String filePath; <START> TestContext context = new TestContext(); <END> Map<String, String> overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type cluster -file " + filePath), 0); context.setCluster(overlay.get("cluster")); Assert.assertEquals(stream.buffer.toString().trim(), "falcon/default/Submit successful (cluster) " + context.getClusterName()); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE2, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.PROCESS_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type process -file " + filePath), 0); initSafemode(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), 0); clearSafemode(); Assert.assertEquals(executeWithURL("entity -updateClusterDependents -cluster " + overlay.get("cluster") + " -skipDryRun "), 0); initSafemode(); overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), -1); clearSafemode(); }</code><technical_language>"context" defined is defined attribute already</technical_language>

Target:
public void testUpdateClusterCommands() throws Exception { FalconCLI.OUT.set(stream); String filePath; overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type cluster -file " + filePath), 0); context.setCluster(overlay.get("cluster")); Assert.assertEquals(stream.buffer.toString().trim(), "falcon/default/Submit successful (cluster) " + context.getClusterName()); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE2, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.PROCESS_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type process -file " + filePath), 0); initSafemode(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), 0); clearSafemode(); Assert.assertEquals(executeWithURL("entity -updateClusterDependents -cluster " + overlay.get("cluster") + " -skipDryRun "), 0); initSafemode(); overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), -1); clearSafemode(); }