@Test public void testEquals() { Ip ip1 = Ip.parse("1.1.1.1"); Ip ip2 = Ip.parse("2.2.2.2"); new EqualsTester() .addEqualityGroup( new AssignIpAddressFromPool(DEST_NAT, DESTINATION, ip1, ip2), new AssignIpAddressFromPool(DEST_NAT, DESTINATION, ip1, ip2)) .addEqualityGroup(new AssignIpAddressFromPool(SOURCE_NAT, DESTINATION, ip1, ip2)) .addEqualityGroup(new AssignIpAddressFromPool(DEST_NAT, SOURCE, ip1, ip2)) .addEqualityGroup(new AssignIpAddressFromPool(DEST_NAT, DESTINATION, ip2, ip2)) .addEqualityGroup(new AssignIpAddressFromPool(DEST_NAT, DESTINATION, ip1, ip1)) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AssignIpAddressFromPool)) { return false; } AssignIpAddressFromPool that = (AssignIpAddressFromPool) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_ipRanges, that._ipRanges); }
AssignIpAddressFromPool implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AssignIpAddressFromPool)) { return false; } AssignIpAddressFromPool that = (AssignIpAddressFromPool) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_ipRanges, that._ipRanges); } }
AssignIpAddressFromPool implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AssignIpAddressFromPool)) { return false; } AssignIpAddressFromPool that = (AssignIpAddressFromPool) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_ipRanges, that._ipRanges); } AssignIpAddressFromPool(TransformationType type, IpField ipField, RangeSet<Ip> ranges);  AssignIpAddressFromPool(
      TransformationType type, IpField ipField, Ip poolStart, Ip poolEnd); }
AssignIpAddressFromPool implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AssignIpAddressFromPool)) { return false; } AssignIpAddressFromPool that = (AssignIpAddressFromPool) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_ipRanges, that._ipRanges); } AssignIpAddressFromPool(TransformationType type, IpField ipField, RangeSet<Ip> ranges);  AssignIpAddressFromPool(
      TransformationType type, IpField ipField, Ip poolStart, Ip poolEnd); @Override T accept(TransformationStepVisitor<T> visitor); @JsonProperty(PROP_IP_FIELD) IpField getIpField(); @JsonProperty(PROP_IP_RANGES) RangeSet<Ip> getIpRanges(); @JsonProperty(PROP_TRANSFORMATION_TYPE) TransformationType getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
AssignIpAddressFromPool implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AssignIpAddressFromPool)) { return false; } AssignIpAddressFromPool that = (AssignIpAddressFromPool) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_ipRanges, that._ipRanges); } AssignIpAddressFromPool(TransformationType type, IpField ipField, RangeSet<Ip> ranges);  AssignIpAddressFromPool(
      TransformationType type, IpField ipField, Ip poolStart, Ip poolEnd); @Override T accept(TransformationStepVisitor<T> visitor); @JsonProperty(PROP_IP_FIELD) IpField getIpField(); @JsonProperty(PROP_IP_RANGES) RangeSet<Ip> getIpRanges(); @JsonProperty(PROP_TRANSFORMATION_TYPE) TransformationType getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }