diff --git a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java
index f6f69d3b..9497ac50 100644
--- a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java
+++ b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportXsltBasedTest.java
@@ -22,18 +22,22 @@ public class ExportXsltBasedTest {
@Test(dataProvider = "Data-Provider-Function")
- public void exportImportExportTest(@NotNull XSLTExporter.Type type, @NotNull final File wisemap, @NotNull final File recFile) throws ImporterException, IOException, ExportException {
+ public void exportImportExportTest(@NotNull XSLTExporter.Type type, @NotNull final File wisemap, @NotNull final File recFile) throws IOException, ExportException {
final Exporter exporter = XSLTExporter.create(type);
byte[] wiseMapContent = FileUtils.readFileToByteArray(wisemap);
if (recFile.exists()) {
// Compare rec and file ...
- final String recContent = FileUtils.readFileToString(recFile, ENC_UTF_8);
+ final String recContent = FileUtils.readFileToString(recFile, ENC_UTF_8)
+ .replaceAll("\n\\p{Blank}+", "\n")
+ .replaceAll("\n+", "\n");
// Export mile content ...
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
exporter.export(wiseMapContent, bos);
- final String exportContent = new String(bos.toByteArray(), StandardCharsets.UTF_8);
+ final String exportContent = new String(bos.toByteArray(), StandardCharsets.UTF_8)
+ .replaceAll("\n\\p{Blank}+", "\n")
+ .replaceAll("\n+", "\n");
Assert.assertEquals(exportContent, recContent);
} else {
diff --git a/wise-webapp/src/test/java/com/wisemapping/test/model/JsonTest.java b/wise-webapp/src/test/java/com/wisemapping/test/model/JsonTest.java
index fc92854c..53d3d72a 100644
--- a/wise-webapp/src/test/java/com/wisemapping/test/model/JsonTest.java
+++ b/wise-webapp/src/test/java/com/wisemapping/test/model/JsonTest.java
@@ -1,8 +1,8 @@
package com.wisemapping.test.model;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.wisemapping.rest.model.*;
-import org.codehaus.jackson.map.ObjectMapper;
import org.testng.annotations.Test;
import java.io.IOException;
diff --git a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAccountITCase.java b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAccountITCase.java
index c6ea9057..d0753ce2 100644
--- a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAccountITCase.java
+++ b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAccountITCase.java
@@ -97,12 +97,12 @@ public class RestAccountITCase {
HttpEntity findUserEntity = new HttpEntity(requestHeaders);
// Add extension only to avoid the fact that the last part is extracted ...
- final String url = BASE_REST_URL + "/admin/users/email/{email}.json";
+ final String url = BASE_REST_URL + "/admin/users/email/{email}";
return templateRest.exchange(url, HttpMethod.GET, findUserEntity, RestUser.class, email);
}
private URI createUser(HttpHeaders requestHeaders, RestTemplate templateRest, RestUser restUser) {
- HttpEntity createUserEntity = new HttpEntity(restUser, requestHeaders);
+ HttpEntity createUserEntity = new HttpEntity< >(restUser, requestHeaders);
return templateRest.postForLocation(BASE_REST_URL + "/admin/users", createUserEntity);
}
diff --git a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java
index 28877be4..cebe82ab 100644
--- a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java
+++ b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestAdminITCase.java
@@ -125,10 +125,10 @@ public class RestAdminITCase {
}
private ResponseEntity findUserByEmail(HttpHeaders requestHeaders, RestTemplate templateRest, final String email) {
- HttpEntity findUserEntity = new HttpEntity(requestHeaders);
+ HttpEntity findUserEntity = new HttpEntity<>(requestHeaders);
// Add extension only to avoid the fact that the last part is extracted ...
- final String url = BASE_REST_URL + "/admin/users/email/{email}.json";
+ final String url = BASE_REST_URL + "/admin/users/email/{email}?mediaType=json";
return templateRest.exchange(url, HttpMethod.GET, findUserEntity, RestUser.class, email);
}
diff --git a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java
index 7316dfff..cf24aa05 100644
--- a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java
+++ b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java
@@ -2,21 +2,10 @@ package com.wisemapping.test.rest;
import com.wisemapping.exceptions.WiseMappingException;
-import com.wisemapping.model.Label;
-import com.wisemapping.model.User;
-import com.wisemapping.rest.model.RestLabel;
-import com.wisemapping.rest.model.RestLabelList;
-import com.wisemapping.rest.model.RestMindmap;
-import com.wisemapping.rest.model.RestMindmapInfo;
-import com.wisemapping.rest.model.RestMindmapList;
-import com.wisemapping.rest.model.RestUser;
+import com.wisemapping.rest.model.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
+import org.springframework.http.*;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate;
import org.testng.SkipException;
@@ -27,14 +16,8 @@ import java.io.IOException;
import java.net.URI;
import java.util.List;
-import static com.wisemapping.test.rest.RestHelper.BASE_REST_URL;
-import static com.wisemapping.test.rest.RestHelper.COLOR;
-import static com.wisemapping.test.rest.RestHelper.HOST_PORT;
-import static com.wisemapping.test.rest.RestHelper.createHeaders;
-import static com.wisemapping.test.rest.RestHelper.createTemplate;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
+import static com.wisemapping.test.rest.RestHelper.*;
+import static org.testng.Assert.*;
@Test
public class RestMindmapITCase {