@Test public void testEquals() { IspModel.Builder builder = IspModel.builder().setAsn(1L).setName("name"); new EqualsTester() .addEqualityGroup(builder.build(), builder.build()) .addEqualityGroup(builder.setAsn(2).build()) .addEqualityGroup(builder.setName("other").build()) .addEqualityGroup( builder .setRemotes( new Remote( "a", "b", ConcreteInterfaceAddress.parse("1.1.1.1/32"), BgpActivePeerConfig.builder().build())) .build()) .addEqualityGroup( builder.setAdditionalPrefixesToInternet(Prefix.parse("1.1.1.1/32")).build()) .addEqualityGroup( builder.setTrafficFiltering(IspTrafficFiltering.blockReservedAddressesAtInternet())) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IspModel)) { return false; } IspModel ispInfo = (IspModel) o; return _asn == ispInfo._asn && _remotes.equals(ispInfo._remotes) && Objects.equals(_name, ispInfo._name) && _additionalPrefixesToInternet.equals(ispInfo._additionalPrefixesToInternet) && _trafficFiltering.equals(ispInfo._trafficFiltering); }
IspModel { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IspModel)) { return false; } IspModel ispInfo = (IspModel) o; return _asn == ispInfo._asn && _remotes.equals(ispInfo._remotes) && Objects.equals(_name, ispInfo._name) && _additionalPrefixesToInternet.equals(ispInfo._additionalPrefixesToInternet) && _trafficFiltering.equals(ispInfo._trafficFiltering); } }
IspModel { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IspModel)) { return false; } IspModel ispInfo = (IspModel) o; return _asn == ispInfo._asn && _remotes.equals(ispInfo._remotes) && Objects.equals(_name, ispInfo._name) && _additionalPrefixesToInternet.equals(ispInfo._additionalPrefixesToInternet) && _trafficFiltering.equals(ispInfo._trafficFiltering); } private  IspModel(
      long asn,
      List<Remote> remotes,
      @Nullable String name,
      Set<Prefix> additionalPrefixesToInternet,
      IspTrafficFiltering trafficFiltering); }
IspModel { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IspModel)) { return false; } IspModel ispInfo = (IspModel) o; return _asn == ispInfo._asn && _remotes.equals(ispInfo._remotes) && Objects.equals(_name, ispInfo._name) && _additionalPrefixesToInternet.equals(ispInfo._additionalPrefixesToInternet) && _trafficFiltering.equals(ispInfo._trafficFiltering); } private  IspModel(
      long asn,
      List<Remote> remotes,
      @Nullable String name,
      Set<Prefix> additionalPrefixesToInternet,
      IspTrafficFiltering trafficFiltering); static @Nonnull Builder builder(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); long getAsn(); @Nonnull String getHostname(); @Nullable String getName(); @Nonnull Set<Prefix> getAdditionalPrefixesToInternet(); @Nonnull IspTrafficFiltering getTrafficFiltering(); }
IspModel { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IspModel)) { return false; } IspModel ispInfo = (IspModel) o; return _asn == ispInfo._asn && _remotes.equals(ispInfo._remotes) && Objects.equals(_name, ispInfo._name) && _additionalPrefixesToInternet.equals(ispInfo._additionalPrefixesToInternet) && _trafficFiltering.equals(ispInfo._trafficFiltering); } private  IspModel(
      long asn,
      List<Remote> remotes,
      @Nullable String name,
      Set<Prefix> additionalPrefixesToInternet,
      IspTrafficFiltering trafficFiltering); static @Nonnull Builder builder(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); long getAsn(); @Nonnull String getHostname(); @Nullable String getName(); @Nonnull Set<Prefix> getAdditionalPrefixesToInternet(); @Nonnull IspTrafficFiltering getTrafficFiltering();  }