@Test public void testEquals() { Layer2VniConfig.Builder builder = Layer2VniConfig.builder() .setVni(1) .setVrf("v") .setRouteDistinguisher(RouteDistinguisher.from(65555L, 1)) .setRouteTarget(ExtendedCommunity.of(0, 1, 1)); Layer2VniConfig vni = builder.build(); new EqualsTester() .addEqualityGroup(vni, vni, builder.build()) .addEqualityGroup(builder.setVrf("v2").build()) .addEqualityGroup(builder.setRouteDistinguisher(RouteDistinguisher.from(65555L, 2)).build()) .addEqualityGroup(builder.setRouteTarget(ExtendedCommunity.of(0, 2, 2)).build()) .addEqualityGroup(builder.setImportRouteTarget("^1:1$").build()) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer2VniConfig)) { return false; } Layer2VniConfig vniConfig = (Layer2VniConfig) o; return _vni == vniConfig._vni && _vrf.equals(vniConfig._vrf) && _rd.equals(vniConfig._rd) && _routeTarget.equals(vniConfig._routeTarget) && _importRouteTarget.equals(vniConfig._importRouteTarget); }
Layer2VniConfig extends VniConfig implements Serializable, Comparable<Layer2VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer2VniConfig)) { return false; } Layer2VniConfig vniConfig = (Layer2VniConfig) o; return _vni == vniConfig._vni && _vrf.equals(vniConfig._vrf) && _rd.equals(vniConfig._rd) && _routeTarget.equals(vniConfig._routeTarget) && _importRouteTarget.equals(vniConfig._importRouteTarget); } }
Layer2VniConfig extends VniConfig implements Serializable, Comparable<Layer2VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer2VniConfig)) { return false; } Layer2VniConfig vniConfig = (Layer2VniConfig) o; return _vni == vniConfig._vni && _vrf.equals(vniConfig._vrf) && _rd.equals(vniConfig._rd) && _routeTarget.equals(vniConfig._routeTarget) && _importRouteTarget.equals(vniConfig._importRouteTarget); } private  Layer2VniConfig(
      int vni,
      String vrf,
      RouteDistinguisher rd,
      ExtendedCommunity routeTarget,
      String importRouteTarget); }
Layer2VniConfig extends VniConfig implements Serializable, Comparable<Layer2VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer2VniConfig)) { return false; } Layer2VniConfig vniConfig = (Layer2VniConfig) o; return _vni == vniConfig._vni && _vrf.equals(vniConfig._vrf) && _rd.equals(vniConfig._rd) && _routeTarget.equals(vniConfig._routeTarget) && _importRouteTarget.equals(vniConfig._importRouteTarget); } private  Layer2VniConfig(
      int vni,
      String vrf,
      RouteDistinguisher rd,
      ExtendedCommunity routeTarget,
      String importRouteTarget); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override int compareTo(Layer2VniConfig o); @Override String toString(); static Builder builder(); }
Layer2VniConfig extends VniConfig implements Serializable, Comparable<Layer2VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer2VniConfig)) { return false; } Layer2VniConfig vniConfig = (Layer2VniConfig) o; return _vni == vniConfig._vni && _vrf.equals(vniConfig._vrf) && _rd.equals(vniConfig._rd) && _routeTarget.equals(vniConfig._routeTarget) && _importRouteTarget.equals(vniConfig._importRouteTarget); } private  Layer2VniConfig(
      int vni,
      String vrf,
      RouteDistinguisher rd,
      ExtendedCommunity routeTarget,
      String importRouteTarget); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override int compareTo(Layer2VniConfig o); @Override String toString(); static Builder builder();  }