PropertyUtil { public static String getDfsName() throws ConfigurationException { String result = null; PropertiesConfiguration config = new PropertiesConfiguration(adminPropertyFileName); result = config.getString("dfs.default.name"); return result; }  static void setTargetUrl(String targetUrl); static String getTargetUrl(); static void setDfsName(String dfsName); static String getDfsName(); static String adminPropertyFileName; }
@Test public void testGetDfsName() throws ConfigurationException { String value = "hdfs: PropertyUtil.setDfsName(value); String url = PropertyUtil.getDfsName(); Assert.assertEquals(value, url); }