@@ -0,0 +1,1195 @@
+package uk.ac.cam.gpe21.droidssl.mitm.util;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic final class HexFormatTest %7B%0A%09@Test%0A%09public void testEmpty() %7B%0A%09%09byte%5B%5D array = new byte%5B0%5D;%0A%09%09String str = HexFormat.format(array, array.length);%0A%09%09assertEquals(%22%22, str);%0A%09%7D%0A%0A%09@Test%0A%09public void testShortLine() %7B%0A%09%09byte%5B%5D array = %22hello%22.getBytes();%0A%09%09String str = HexFormat.format(array, array.length);%0A%09%09assertEquals(%220000  68 65 6c 6c 6f                                     hello%22, str);%0A%09%7D%0A%0A%09@Test%0A%09public void testLongLine() %7B%0A%09%09byte%5B%5D array = %22hello world%22.getBytes();%0A%09%09String str = HexFormat.format(array, array.length);%0A%09%09assertEquals(%220000  68 65 6c 6c 6f 20 77 6f  72 6c 64                  hello wo rld%22, str);%0A%09%7D%0A%0A%09@Test%0A%09public void testMultipleLines() %7B%0A%09%09byte%5B%5D array = %22The quick brown fox jumped over the lazy dog.%22.getBytes();%0A%09%09String str = HexFormat.format(array, array.length);%0A%09%09assertEquals(%0A%09%09%09%220000  54 68 65 20 71 75 69 63  6b 20 62 72 6f 77 6e 20   The quic k brown %5Cn%22 +%0A%09%09%09%220010  66 6f 78 20 6a 75 6d 70  65 64 20 6f 76 65 72 20   fox jump ed over %5Cn%22 +%0A%09%09%09%220020  74 68 65 20 6c 61 7a 79  20 64 6f 67 2e            the lazy  dog.%22, str);%0A%09%7D%0A%7D%0A

Add HexFormat unit test.