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(expected = IllegalArgumentException.class)
  public void testNullIpAddress() {
    //create MachineList with a list of of ip ranges specified in CIDR format
    MachineList ml = new MachineList(CIDR_LIST, new TestAddressFactory());

    //test for exclusion with a null IP
    assertFalse(ml.includes((String) null));
    assertFalse(ml.includes((InetAddress) null));
  }