### Question:
IoUtil { public static int getFreeRandomPort() { return getFreeRandomPort(49152, 65535, 100); }  static void download(KitLogger log, URL downloadUrl, File target); static int getFreeRandomPort(); static int getFreeRandomPort(int min, int max, int attempts); static String sanitizeFileName(String name);  }### Answer:
@Test public void findOpenPort() throws IOException { int port = IoUtil.getFreeRandomPort(); try (ServerSocket ss = new ServerSocket(port)) { } }
@Test public void findOpenPortWhenPortsAreBusy() throws IOException { int port = IoUtil.getFreeRandomPort(49152, 60000, 100); try (ServerSocket ss = new ServerSocket(port)) { } int port2 = IoUtil.getFreeRandomPort(port, 65535, 100); try (ServerSocket ss = new ServerSocket(port2)) { } assertTrue(port2 > port); }