@Test
public void testGetFile() throws IOException {

  Configuration conf = new Configuration();
  String[] dirs = new String[]{"a", "b", "c"};
  for (int i = 0; i < dirs.length; i++) {
    dirs[i] = new Path(GenericTestUtils.getTempPath(dirs[i])).toString();
  }
  conf.set("dirs", StringUtils.join(dirs, ","));
  for (int i = 0; i < 1000; i++) {
    String localPath = conf.getFile("dirs", "dir" + i).toString();
    assertTrue("Path doesn't end in specified dir: " + localPath,
      localPath.endsWith("dir" + i));
    assertFalse("Path has internal whitespace: " + localPath,
      localPath.contains(" "));
  }
}