@Test
public void testMasksV4() throws UnknownHostException {

    InetAddress mask = InetAddress.getByName("128.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(1, false)));
    mask = InetAddress.getByName("192.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(2, false)));
    mask = InetAddress.getByName("224.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(3, false)));
    mask = InetAddress.getByName("240.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(4, false)));
    mask = InetAddress.getByName("248.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(5, false)));
    mask = InetAddress.getByName("252.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(6, false)));
    mask = InetAddress.getByName("254.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(7, false)));
    mask = InetAddress.getByName("255.0.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(8, false)));
    mask = InetAddress.getByName("255.128.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(9, false)));
    mask = InetAddress.getByName("255.192.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(10, false)));
    mask = InetAddress.getByName("255.224.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(11, false)));
    mask = InetAddress.getByName("255.240.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(12, false)));
    mask = InetAddress.getByName("255.248.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(13, false)));
    mask = InetAddress.getByName("255.252.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(14, false)));
    mask = InetAddress.getByName("255.254.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(15, false)));
    mask = InetAddress.getByName("255.255.0.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(16, false)));
    mask = InetAddress.getByName("255.255.128.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(17, false)));
    mask = InetAddress.getByName("255.255.192.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(18, false)));
    mask = InetAddress.getByName("255.255.224.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(19, false)));
    mask = InetAddress.getByName("255.255.240.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(20, false)));
    mask = InetAddress.getByName("255.255.248.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(21, false)));
    mask = InetAddress.getByName("255.255.252.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(22, false)));
    mask = InetAddress.getByName("255.255.254.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(23, false)));
    mask = InetAddress.getByName("255.255.255.0");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(24, false)));
    mask = InetAddress.getByName("255.255.255.128");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(25, false)));
    mask = InetAddress.getByName("255.255.255.192");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(26, false)));
    mask = InetAddress.getByName("255.255.255.224");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(27, false)));
    mask = InetAddress.getByName("255.255.255.240");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(28, false)));
    mask = InetAddress.getByName("255.255.255.248");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(29, false)));
    mask = InetAddress.getByName("255.255.255.252");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(30, false)));
    mask = InetAddress.getByName("255.255.255.254");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(31, false)));
    mask = InetAddress.getByName("255.255.255.255");
    assertTrue(mask.equals(NetUtils.getInetNetworkMask(32, false)));
}