### Question:
ProxyUtils { public static boolean validateProxy(Proxy p) { Socket socket = null; try { socket = new Socket(); InetSocketAddress endpointSocketAddr = new InetSocketAddress(p.getHost(), p.getPort()); socket.connect(endpointSocketAddr, 3000); return true; } catch (IOException e) { logger.warn("FAIL - socket connect fail! remote: " + p); return false; } finally { if (socket != null) { try { socket.close(); } catch (IOException e) { logger.warn("Error occurred while closing socket of validating proxy", e); } } } }  static boolean validateProxy(Proxy p);  }### Answer:
@Test public void test_proxy_validate() throws Exception { Proxy proxy = new Proxy("123.53.119.69", 61234); ProxyUtils.validateProxy(proxy); }