package io.quarkus.deployment.pkg.steps;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

import org.junit.jupiter.api.Test;

import io.quarkus.deployment.steps.BannerProcessor;
import io.quarkus.fs.util.ZipUtils;

public class BannerProcessorTest {

    class MyBannerProcessor extends BannerProcessor {
        public boolean test(Path path) throws Exception {
            return this.isQuarkusCoreBanner(path.toUri().toURL());
        }
    }

    @Test
    public void checkQuarkusCoreBannerOnFilesystemWithSpecialCharacters() throws Exception {
        MyBannerProcessor processor = new MyBannerProcessor();

        assertFalse(processor.test(Paths.get("tmp", "Descărcări", "test", "something!")));

        final Path tmpDir = Files.createTempDirectory("Descărcări");
        final Path zipPath = tmpDir.resolve("BannerProcessorTest.jar");

        try {
            try (FileSystem ignored = ZipUtils.newZip(zipPath)) {
            }

            try (FileSystem fs = ZipUtils.newFileSystem(zipPath)) {
                assertFalse(processor.test(fs.getPath("/")));
            }

            try (final FileSystem fs = ZipUtils.newFileSystem(zipPath)) {
                Path classFile = fs.getPath(MyBannerProcessor.class.getName().replace('.', '/') + ".class");
                Files.createDirectories(classFile.getParent());
                Files.write(classFile, "".getBytes(StandardCharsets.UTF_8));
            }

            try (FileSystem fs = ZipUtils.newFileSystem(zipPath)) {
                assertTrue(processor.test(fs.getPath("/")));
            }
        } finally {
            Files.deleteIfExists(zipPath);
        }
    }
}

@@ -289,36 +289,43 @@
 th;%0A
+%0A
 import 
-java.nio.file.Paths;%0A
+org.junit.jupiter.api.Test;
 %0Aimp
@@ -350,20 +350,26 @@
 ter.api.
-Test
+io.TempDir
 ;%0A%0Aimpor
@@ -766,16 +766,37 @@
 racters(
+@TempDir Path tempDir
 ) throws
@@ -911,47 +911,62 @@
 est(
-Paths.get(%22tmp%22, %22Desc%C4%83rc%C4%83ri%22, %22test%22, 
+tempDir.resolve(%22Desc%C4%83rc%C4%83ri%22).resolve(%22test%22).resolve(
 %22som
@@ -1033,16 +1033,25 @@
 rectory(
+tempDir, 
 %22Desc%C4%83rc

Use `@TempDir` in BannerProcessorTest