public boolean includes(String ipAddress) {
    
    if (all) {
      return true;
    }
    
    if (ipAddress == null) {
      throw new IllegalArgumentException("ipAddress is null.");
    }

    try {
      return includes(addressFactory.getByName(ipAddress));
    } catch (UnknownHostException e) {
      return false;
    }
  }
@Test
  public void testIPandCIDRs() {
    //create MachineList with a list of of ip ranges and ip addresses
    MachineList ml = new MachineList(IP_CIDR_LIST, new TestAddressFactory());

    //test for inclusion with an known IP
    assertTrue(ml.includes("10.119.103.112"));

    //test for exclusion with an unknown IP
    assertFalse(ml.includes("10.119.103.111"));

    //CIDR Ranges
    assertFalse(ml.includes("10.221.255.255"));
    assertTrue(ml.includes("10.222.0.0")); 
    assertTrue(ml.includes("10.222.255.255"));
    assertFalse(ml.includes("10.223.0.0"));

    assertFalse(ml.includes("10.241.22.255"));
    assertTrue(ml.includes("10.241.23.0")); 
    assertTrue(ml.includes("10.241.23.255")); 
    assertFalse(ml.includes("10.241.24.0"));
  }