From 6eac37ed451b5e16a1cd8b1917c121584501de34 Mon Sep 17 00:00:00 2001 From: "Zickermann, Jan" <jan.zickermann@dataport.de> Date: Fri, 24 May 2024 13:41:42 +0200 Subject: [PATCH] OZG-5412 XTAITCase: Fix bad import --- .../de/ozgcloud/eingang/xta/XtaResponseTestFactory.java | 4 ++-- .../de/ozgcloud/eingang/xta/zip/ZipFileExtractorTest.java | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaResponseTestFactory.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaResponseTestFactory.java index 603e274db..4e6fed5d2 100644 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaResponseTestFactory.java +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaResponseTestFactory.java @@ -8,6 +8,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; +import java.nio.charset.StandardCharsets; import java.time.ZonedDateTime; import java.util.Arrays; import java.util.List; @@ -21,7 +22,6 @@ import org.apache.commons.codec.Resources; import org.apache.commons.io.IOUtils; import de.ozgcloud.common.binaryfile.TempFileUtils; -import kotlin.text.Charsets; public class XtaResponseTestFactory { @@ -121,7 +121,7 @@ public class XtaResponseTestFactory { private static Stream<String> listResourceFileNames(String resourceDirectoryPath) { try (var inputStream = Resources.getInputStream(resourceDirectoryPath)) { - return Arrays.stream(IOUtils.toString(inputStream, Charsets.UTF_8).split("\n")); + return Arrays.stream(IOUtils.toString(inputStream, StandardCharsets.UTF_8).split("\n")); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractorTest.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractorTest.java index 0dec2e57b..5a79c2a8e 100644 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractorTest.java +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractorTest.java @@ -26,7 +26,6 @@ import org.springframework.util.MimeTypeUtils; import de.ozgcloud.eingang.common.errorhandling.TechnicalException; import de.ozgcloud.eingang.common.formdata.IncomingFile; -import kotlin.text.Charsets; class ZipFileExtractorTest { @@ -149,7 +148,7 @@ class ZipFileExtractorTest { private List<TestZipEntry> fromMap(Map<String, String> entries) { return entries.entrySet().stream().map(kv -> TestZipEntry.builder() .name(kv.getKey()) - .content(kv.getValue().getBytes(Charsets.UTF_8)) + .content(kv.getValue().getBytes(StandardCharsets.UTF_8)) .build()) .toList(); } @@ -212,7 +211,6 @@ class ZipFileExtractorTest { } } - @DisplayName("sum uncompressed entry size") @Nested class TestSumUncompressedEntrySize { @@ -234,7 +232,6 @@ class ZipFileExtractorTest { } } - @Nested class TestContentType { @@ -267,7 +264,6 @@ class ZipFileExtractorTest { } } - @DisplayName("map zip entries") @Nested class TestMapZipEntries { @@ -307,5 +303,4 @@ class ZipFileExtractorTest { return string.getBytes(StandardCharsets.UTF_8); } - } -- GitLab