Bug 575379 - TemplateCompletionTests.testEmptyFile fails on Windows

Change-Id: If4856843801d9653226012c1ca80fb1b64011fc5
Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/186210
Tested-by: JDT Bot <jdt-bot@eclipse.org>
diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java
index 08a3f70..6c6eb5a 100644
--- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java
+++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/templates/TemplateCompletionTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2019, 2020 Red Hat Inc. and others.
+ * Copyright (c) 2019, 2021 Red Hat Inc. and others.
  *
  * This program and the accompanying materials are made
  * available under the terms of the Eclipse Public License 2.0
@@ -80,12 +80,12 @@
 
 		ITextViewer viewer= initializeViewer(cu);
 		applyProposal(viewer, proposals, "new_class", completionIndex);
-
+		String lineSeparator= System.lineSeparator();
 		StringBuffer expected= new StringBuffer();
-		expected.append("   package test;\n" +
-				"\n" +
-				"public class EmptyFile  {\n" +
-				"\n" +
+		expected.append("   package test;" + lineSeparator +
+				lineSeparator +
+				"public class EmptyFile  {" + lineSeparator +
+				lineSeparator +
 				"}");
 
 		assertEquals(expected.toString(), viewer.getDocument().get());