### Question:
IPUtil { public static String intToIp(int i) { StringBuilder out = new StringBuilder(15); out.append((i >> 24) & 0xFF); out.append("."); out.append((i >> 16) & 0xFF); out.append("."); out.append((i >> 8) & 0xFF); out.append("."); out.append(i & 0xFF); return out.toString(); } private  IPUtil(); static int ipToInt(final String addr); static String intToIp(int i); static long ipToLong(final String addr);  }### Answer:
@Test public void testIntToIp() { assertEquals("0.0.0.0", IPUtil.intToIp(0)); assertEquals("0.0.0.255", IPUtil.intToIp(255)); assertEquals("0.0.1.255", IPUtil.intToIp((1 * 256) + 255)); assertEquals("0.25.1.255", IPUtil.intToIp((25 * 256 * 256) + (1 * 256) + 255)); assertEquals("32.25.1.255", IPUtil.intToIp((32 * 256 * 256 * 256) + (25 * 256 * 256) + (1 * 256) + 255)); assertEquals("255.255.255.255", IPUtil.intToIp((255 * 256 * 256 * 256) + (255 * 256 * 256) + (255 * 256) + 255)); }