### Question:
FileUtil { static File getFile(String path, String toolHome) { if (StringUtils.isBlank(path)) { return null; } if (!(path.startsWith(".") || new File(path).isAbsolute())) { return new File(toolHome, path); } return new File(path); }  static File getExistingFile(String path, String toolHome); static File getExistingDirectory(String directory, String toolHome);  }### Answer:
@Test public void testGetFile_pathEmpty() { File file = FileUtil.getFile("", "toolHome"); assertNull(file); file = FileUtil.getFile(null, "toolHome"); assertNull(file); }
@Test public void testGetFile_absolutePath() { final File absoluteFile = new File("."); final String absolutePath = absoluteFile.getAbsolutePath(); final File file = FileUtil.getFile(absolutePath, "toolHome"); assertNotNull(file); assertEquals(absolutePath, file.getAbsolutePath()); }
@Test public void testGetFile_relativePath() { final File toolHomeFile = new File("."); final String toolHome = toolHomeFile.getAbsolutePath(); final File file = FileUtil.getFile("schneck", toolHome); assertNotNull(file); assertEquals(toolHome + File.separator + "schneck", file.getAbsolutePath()); }