@Test
public void testIpCheck() {

    
    // subnet/netmask: 10.1.0.1/32
    // address range: 10.1.0.1
    
    IPBlock ipBlock = new IPBlock("10.1.0.1/32");
    assertTrue(ipBlock.ipCheck(IPBlock.convertIPToLong("10.1.0.1")));
    assertFalse(ipBlock.ipCheck(IPBlock.convertIPToLong("10.1.0.2")));
    
    // subnet/netmask: 10.1.0.0/21
    // address range: 10.1.0.0 - 10.1.7.255
    
    ipBlock = new IPBlock("10.1.0.0/21");
    assertTrue(ipBlock.ipCheck(IPBlock.convertIPToLong("10.1.0.0")));
    assertTrue(ipBlock.ipCheck(IPBlock.convertIPToLong("10.1.7.255")));
    assertTrue(ipBlock.ipCheck(IPBlock.convertIPToLong("10.1.3.25")));
    assertTrue(ipBlock.ipCheck(IPBlock.convertIPToLong("10.1.0.24")));
    assertFalse(ipBlock.ipCheck(IPBlock.convertIPToLong("10.1.8.0")));
    assertFalse(ipBlock.ipCheck(IPBlock.convertIPToLong("10.0.0.0")));
    assertFalse(ipBlock.ipCheck(IPBlock.convertIPToLong("10.2.0.0")));
    assertFalse(ipBlock.ipCheck(IPBlock.convertIPToLong("10.2.1.255")));
    ipBlock = new IPBlock("35.160.0.0/13");
    assertTrue(ipBlock.ipCheck(IPBlock.convertIPToLong("35.166.98.147")));
}