Update aai-parent in babel to 1.13.3
[aai/babel.git] / src / test / java / org / onap / aai / babel / util / ArtifactTestUtils.java
index a98b7c2..2cf221d 100644 (file)
@@ -25,7 +25,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -94,7 +94,7 @@ public class ArtifactTestUtils {
 
         for (Artifact artifact : toscaFiles) {
             String fileName = artifact.getName().replaceFirst("Definitions/", "ymlFiles/");
-            String expectedYaml = ymlMap.get(fileName);
+            String expectedYaml = ymlMap.get(fileName).replaceAll("\\r\\n?", "\n");
             assertThat("Missing expected content for " + fileName, expectedYaml, is(not(nullValue())));
             assertThat("The content of " + fileName + " must match the expected content",
                     convertToString(artifact.getPayload()).replaceAll("\\r\\n?", "\n"), is(equalTo(expectedYaml)));
@@ -128,7 +128,7 @@ public class ArtifactTestUtils {
 
     public String loadResourceAsString(String resourceName) throws IOException {
         try {
-        return IOUtils.toString(getResource(resourceName), Charset.defaultCharset());
+            return IOUtils.toString(getResource(resourceName), Charset.defaultCharset());
         } catch (NullPointerException e) {
             throw new IllegalArgumentException("No such resource " + resourceName);
         }