diff --git a/src/test/java/com/xebialabs/overthere/TemporaryFolder.java b/src/test/java/com/xebialabs/overthere/TemporaryFolder.java index bdbdb1d8..b2d1e13e 100644 --- a/src/test/java/com/xebialabs/overthere/TemporaryFolder.java +++ b/src/test/java/com/xebialabs/overthere/TemporaryFolder.java @@ -24,15 +24,14 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Files; public class TemporaryFolder { private File tempRoot; public void create() throws IOException { - tempRoot = File.createTempFile("testng", ".tmp"); - tempRoot.delete(); - tempRoot.mkdir(); + tempRoot = Files.createTempDirectory("testng" + ".tmp").toFile(); } public void delete() {