@Override
  public void reset() throws IOException {
    createDirectory(PATH_DATA.getKey());
    createDirectory(PATH_WEB.getKey());
    createDirectory(PATH_LOGS.getKey());
    File tempDir = createOrCleanTempDirectory(PATH_TEMP.getKey());
    try (AllProcessesCommands allProcessesCommands = new AllProcessesCommands(tempDir)) {
      allProcessesCommands.clean();
    }
  }
@Test
  public void fail_if_required_directory_is_a_file() throws Exception {
    // <home>/data is missing
    FileUtils.forceMkdir(webDir);
    FileUtils.forceMkdir(logsDir);
    FileUtils.touch(dataDir);

    assertThatThrownBy(() -> underTest.reset())
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Property 'sonar.path.data' is not valid, not a directory: " + dataDir.getAbsolutePath());
  }