private File create(String filename) throws IOException {
    File file = new File(tempDir, filename);
    if (file.exists()) {
      assertTrue(file.getAbsolutePath() + " already exists and could not be deleted", file.delete());
    }
    assertTrue("Segment file could not be created at path " + file.getAbsolutePath(), file.createNewFile());
    file.deleteOnExit();
    return file;
  }
Creates a file with name {@code filename}.
@param filename the desired name of the file to be created.
@return a {@link File} instance pointing the newly created file named {@code filename}.
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/LogTest.java