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 5caa59e596..acac9172b4 100644 --- a/core-java/src/test/java/com/baeldung/file/GuavaTest.java +++ b/core-java/src/test/java/com/baeldung/file/GuavaTest.java @@ -24,11 +24,11 @@ public class GuavaTest { public void whenAppendToFileUsingGuava_thenCorrect() throws IOException { File file = new File(fileName); CharSink chs = Files.asCharSink(file, Charsets.UTF_8, FileWriteMode.APPEND); - chs.write("Spain"); + chs.write("Spain\r\n"); assertThat(StreamUtils.getStringFromInputStream( new FileInputStream(fileName))) - .isEqualTo("UK\r\n" + "US\r\n" + "Germany\r\n" + "Spain"); + .isEqualTo("UK\r\n" + "US\r\n" + "Germany\r\n" + "Spain\r\n"); } @After