From 1a368ca9f394cb37b9a5fa0408ff7ae70806495b Mon Sep 17 00:00:00 2001 From: Ahmed Tawila Date: Thu, 16 Nov 2017 12:22:12 +0200 Subject: [PATCH] fix test failures --- core-java/src/test/java/com/baeldung/file/GuavaTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core-java/src/test/java/com/baeldung/file/GuavaTest.java b/core-java/src/test/java/com/baeldung/file/GuavaTest.java index acac9172b4..5a7ec6c4a8 100644 --- a/core-java/src/test/java/com/baeldung/file/GuavaTest.java +++ b/core-java/src/test/java/com/baeldung/file/GuavaTest.java @@ -8,6 +8,7 @@ import java.io.IOException; import java.io.PrintWriter; import org.junit.After; +import org.junit.Before; import org.junit.Test; import com.baeldung.util.StreamUtils; @@ -19,6 +20,13 @@ import com.google.common.io.Files; public class GuavaTest { public static final String fileName = "src/main/resources/countries.properties"; + + @Before + public void setup() throws Exception { + PrintWriter writer = new PrintWriter(fileName); + writer.print("UK\r\n" + "US\r\n" + "Germany\r\n"); + writer.close(); + } @Test public void whenAppendToFileUsingGuava_thenCorrect() throws IOException {