|
16 | 16 |
|
17 | 17 | package de.rub.nds.modifiablevariable.util; |
18 | 18 |
|
19 | | -import java.nio.charset.Charset; |
20 | 19 | import java.nio.charset.StandardCharsets; |
21 | 20 | import java.util.Arrays; |
22 | 21 | import org.apache.commons.lang.StringEscapeUtils; |
| 22 | +import org.apache.logging.log4j.LogManager; |
| 23 | +import org.apache.logging.log4j.Logger; |
23 | 24 | import org.junit.After; |
24 | 25 | import org.junit.AfterClass; |
25 | 26 | import org.junit.Before; |
26 | 27 | import org.junit.BeforeClass; |
27 | 28 | import org.junit.Test; |
28 | 29 | import static org.junit.Assert.*; |
29 | 30 |
|
30 | | -/** |
31 | | - * |
32 | | - * @author ic0ns |
33 | | - */ |
34 | 31 | public class IllegalStringAdapterTest { |
35 | 32 |
|
| 33 | + private Logger LOGGER = LogManager.getLogger(); |
| 34 | + |
36 | 35 | public IllegalStringAdapterTest() { |
37 | 36 | } |
38 | 37 |
|
@@ -62,14 +61,13 @@ public void testUnmarshal() { |
62 | 61 | for (int i = 0; i < data.length; i++) { |
63 | 62 | data[i] = (byte) i; |
64 | 63 | } |
65 | | - // System.out.println("Plain: " + new String(data, StandardCharsets.US_ASCII)); |
66 | | - System.out.println(Arrays.toString(new String(data, StandardCharsets.ISO_8859_1) |
67 | | - .getBytes(StandardCharsets.ISO_8859_1))); |
| 64 | + LOGGER.info("Bytes :" |
| 65 | + + Arrays.toString(new String(data, StandardCharsets.ISO_8859_1).getBytes(StandardCharsets.ISO_8859_1))); |
68 | 66 | String marshal = instance.marshal(new String(data, StandardCharsets.ISO_8859_1)); |
69 | | - System.out.println("Marshal: " + marshal); |
| 67 | + LOGGER.info("Marshal: " + marshal); |
70 | 68 | String unmarshal = instance.unmarshal(marshal); |
71 | | - System.out.println(StringEscapeUtils.unescapeXml(unmarshal)); |
72 | | - System.out.println("Unmarshal: " + unmarshal); |
| 69 | + LOGGER.info("Unescaped:" + StringEscapeUtils.unescapeXml(unmarshal)); |
| 70 | + LOGGER.info("Unmarshal: " + unmarshal); |
73 | 71 | assertArrayEquals(data, unmarshal.getBytes(StandardCharsets.ISO_8859_1)); |
74 | 72 | } |
75 | 73 | } |
0 commit comments