diff --git a/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java b/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java index fa1bd2f4614..9dba257695d 100644 --- a/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java +++ b/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java @@ -29,7 +29,7 @@ public class DataAttachmentTests extends ElasticsearchTestCase { Attachment attachment = DataAttachment.JSON.create(data); InputStream input = attachment.bodyPart().getDataHandler().getInputStream(); String content = Streams.copyToString(new InputStreamReader(input, Charsets.UTF_8)); - assertThat(content, is("{\n \"key\" : \"value\"\n}")); + assertThat(content, is("{\n \"key\" : \"value\"" + System.lineSeparator() + "}")); } @Test @@ -38,6 +38,6 @@ public class DataAttachmentTests extends ElasticsearchTestCase { Attachment attachment = DataAttachment.YAML.create(data); InputStream input = attachment.bodyPart().getDataHandler().getInputStream(); String content = Streams.copyToString(new InputStreamReader(input, Charsets.UTF_8)); - assertThat(content, is("---\nkey: \"value\"\n")); + assertThat(content, is("---\nkey: \"value\"" + System.lineSeparator())); } }