// Path: core/src/main/java/de/otto/jlineup/file/FileUtils.java
// public class FileUtils {
// 
// 
//     public static void clearDirectory(String path) throws IOException {
//         Path directory = Paths.get(path);
//         try(DirectoryStream<Path> paths = Files.newDirectoryStream(directory);) {
//             paths.forEach(file -> {
//                 try {
//                     if (Files.isDirectory(file)) {
//                         clearDirectory(file.toAbsolutePath().toString());
//                     }
// 
//                     Files.delete(file);
//                 } catch (IOException e) {
//                     throw new UncheckedIOException(e);
//                 }
//             });
//         }
//     }
// 
//     public static void deleteDirectory(Path path) throws IOException {
//         clearDirectory(path.toString());
//         Files.deleteIfExists(path);
//     }
// 
//     public static void deleteDirectory(String path) throws IOException {
//         deleteDirectory(Paths.get(path));
//     }
// 
// }


import de.otto.jlineup.file.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.FileTime;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
import java.util.stream.Stream;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
package de.otto.jlineup.service;




public class HousekeeperTest {

    private Path tempJLineupDirectory;
    private Path tempDirectory;
    private Housekeeper housekeeper;


    @Before
    public void before() throws IOException {
        tempJLineupDirectory = Files.createTempDirectory("jlineup-web-test");
        tempDirectory =  new File(System.getProperty("java.io.tmpdir")).toPath();
        housekeeper = new Housekeeper(tempJLineupDirectory);
    }

    @After
    public void cleanUp() throws IOException {
// Path: core/src/main/java/de/otto/jlineup/file/FileUtils.java
// public class FileUtils {
// 
// 
//     public static void clearDirectory(String path) throws IOException {
//         Path directory = Paths.get(path);
//         try(DirectoryStream<Path> paths = Files.newDirectoryStream(directory);) {
//             paths.forEach(file -> {
//                 try {
//                     if (Files.isDirectory(file)) {
//                         clearDirectory(file.toAbsolutePath().toString());
//                     }
// 
//                     Files.delete(file);
//                 } catch (IOException e) {
//                     throw new UncheckedIOException(e);
//                 }
//             });
//         }
//     }
// 
//     public static void deleteDirectory(Path path) throws IOException {
//         clearDirectory(path.toString());
//         Files.deleteIfExists(path);
//     }
// 
//     public static void deleteDirectory(String path) throws IOException {
//         deleteDirectory(Paths.get(path));
//     }
// 
// }


// Path: web/src/test/java/de/otto/jlineup/service/HousekeeperTest.java
import de.otto.jlineup.file.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.FileTime;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
import java.util.stream.Stream;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;

package de.otto.jlineup.service;




public class HousekeeperTest {

    private Path tempJLineupDirectory;
    private Path tempDirectory;
    private Housekeeper housekeeper;


    @Before
    public void before() throws IOException {
        tempJLineupDirectory = Files.createTempDirectory("jlineup-web-test");
        tempDirectory =  new File(System.getProperty("java.io.tmpdir")).toPath();
        housekeeper = new Housekeeper(tempJLineupDirectory);
    }

    @After
    public void cleanUp() throws IOException {
        FileUtils.deleteDirectory(tempJLineupDirectory);