public static String sanitizeFileName(String fileName) {
        if (fileName == null) {
            return null;
        }
        // converts a unicode string to plain ascii
        String asciiFileName = Normalizer.normalize(fileName, Normalizer.Form.NFD)
                .replaceAll("[^\\p{ASCII}]", "");
        // replaces all non-alphanumeric characters (excluding -_.) with _
        return asciiFileName.replaceAll("[^a-zA-Z0-9-_.]", "_");
    }
@Test
    public void testSanitizeFileName() {
        assertEquals(RuntimeUtils.sanitizeFileName("file(1).jar"), "file_1_.jar");
        assertEquals(RuntimeUtils.sanitizeFileName("äöå.txt"), "aoa.txt");
        assertEquals(RuntimeUtils.sanitizeFileName("ÄÖÅ.txt"), "AOA.txt");
        assertNull(RuntimeUtils.sanitizeFileName(null));
    }