### Question:
UndeployTask extends CelosCi { public CelosCiContext getCiContext() { return this.ciContext; } UndeployTask(CiCommandLine commandLine); CelosCiContext getCiContext(); @Override void start();  }### Answer:
@Test public void testCelosCiUndeployContext() throws Exception { String hadoopCoreUrl = Thread.currentThread().getContextClassLoader().getResource("com/collective/celos/ci/testing/config/core-site.xml").getFile(); String hadoopHdfsUrl = Thread.currentThread().getContextClassLoader().getResource("com/collective/celos/ci/testing/config/hdfs-site.xml").getFile(); String targetFileStr = "{\n" + " \"security.settings\": \"secsettings\",\n" + " \"workflows.dir.uri\": \"celoswfdir\",\n" + " \"hadoop.hdfs-site.xml\": \"" + hadoopHdfsUrl +"\",\n" + " \"hadoop.core-site.xml\": \"" + hadoopCoreUrl +"\",\n" + " \"defaults.dir.uri\": \"defdir\"\n" + "}\n"; File targetFile = tempDir.newFile(); FileOutputStream stream = new FileOutputStream(targetFile); stream.write(targetFileStr.getBytes()); stream.flush(); CiCommandLine commandLine = new CiCommandLine(targetFile.toURI().toString(), "UNDEPLOY", "deploydir", "workflow", "testDir", "uname", false, null, "/hdfsRoot"); UndeployTask celosCiDeploy = new UndeployTask(commandLine); CelosCiContext context = celosCiDeploy.getCiContext(); Assert.assertEquals(context.getDeployDir(), commandLine.getDeployDir()); Assert.assertEquals(context.getHdfsPrefix(), ""); Assert.assertEquals(context.getMode(), commandLine.getMode()); Assert.assertEquals(context.getTarget().getWorkflowsDirUri(), URI.create("celoswfdir")); Assert.assertEquals(context.getTarget().getDefaultsDirUri(), URI.create("defdir")); Assert.assertEquals(context.getTarget().getPathToCoreSite(), URI.create(hadoopCoreUrl)); Assert.assertEquals(context.getTarget().getPathToHdfsSite(), URI.create(hadoopHdfsUrl)); Assert.assertEquals(context.getUserName(), commandLine.getUserName()); Assert.assertEquals(context.getWorkflowName(), commandLine.getWorkflowName()); }