private File createFile(File parentDir, String filename) throws IOException {
    File file = new File(parentDir, filename);
    if (!file.exists()) {
      assertTrue("File could not be created at path " + file.getAbsolutePath(), file.createNewFile());
    }
    file.deleteOnExit();
    return file;
  }
Creates a file in {@code parentDir} with name {@code filename} and configures it to be deleted on exit.
@param parentDir the directory where a file with {@code filename} needs to be created.
@param filename the name of the file to be created.
@return a reference to the created {@link File}.
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/LogSegmentNameTest.java