HadoopWorkflowDescriptorUtils { public void replaceJarPath(File workflowProperty) throws ConfigurationException { PropertiesConfiguration config = new PropertiesConfiguration(workflowProperty); String workflowFolder = workflowProperty.getParent(); workflowFolder.replace("\\", "/"); workflowFolder = HadoopWorkflowUtils.fileURLPrefix + workflowFolder; config.setProperty("jar.path", workflowFolder); config.save(); }  boolean replacePropertyPlaceHolder(File workflowDescriptor, File workflowProperty); void replaceJarPath(File workflowProperty); ClassLoader getBeanClassLoader(); void setBeanClassLoader(ClassLoader beanClassLoader); void setResourceLoader(ResourceLoader resourceLoader); ResourceLoader getResourceLoader();  }
@Test public void testReplaceJarPath() { File f = new File("src/test/resources/org/springframework/data/hadoop/admin/util/hadoop.properties"); try { util.replaceJarPath(f); } catch (ConfigurationException e) { fail("exception was thrown when replacing jar path."); } try { PropertiesConfiguration config = new PropertiesConfiguration( "src/test/resources/org/springframework/data/hadoop/admin/util/hadoop.properties"); String newValue = config.getString("jar.path"); Assert.assertNotNull(newValue, "jar.path should not be null"); } catch (ConfigurationException e) { fail("read replaced property fail"); } }