### Question:
IpAddressUtils { public static String format(long ipAddress) { if (ipAddress < 0L || (1L << 32) - 1 < ipAddress) { throw new IllegalArgumentException("IpAddress number " + ipAddress + " is illegal."); } String[] octets = new String[4]; for (int i = 0; i < 4; i++) { octets[3 - i] = Long.toString(ipAddress % 256); ipAddress = ipAddress / 256; } return StringUtils.join(octets, "."); }  static long parse(String ipAddress); static String format(long ipAddress); static long getNetworkAddress(String cidr); static long getNetworkAddress(String ipAddress, int prefix); static long getNetworkAddress(long ipAddress, int prefix); static long getBroadcastAddress(String cidr); static long getBroadcastAddress(String ipAddress, int prefix); static long getBroadcastAddress(long ipAddress, int prefix);  }### Answer:
@Test public void testFormat() { assertEquals("0.0.0.0", IpAddressUtils.format(0L)); assertEquals("255.255.255.255", IpAddressUtils.format((1L << 32) - 1)); long address = (1L << 24) * 192 + (1L << 16) * 168 + (1L << 8) * 1 + 1L * 5; assertEquals("192.168.1.5", IpAddressUtils.format(address)); }