@Test public void testGetDataCenter() throws IOException { final Configuration conf = new Configuration(); final String dcFile = FileHelperUtil.getResourcePath(getClass(), new Path("datacenter", "datacenter").toString()); final String dc = JobUtil.getDataCenterForJob(dcFile); Assert.assertEquals("test_dc", dc); } }