@Test public void testInterfaceRuntimeDataEquals() { ConcreteInterfaceAddress address = ConcreteInterfaceAddress.parse("1.2.3.4/24"); double bandwidth = 1; boolean lineUp = true; double speed = 3; InterfaceRuntimeData.Builder irdBuilder = InterfaceRuntimeData.builder() .setAddress(address) .setBandwidth(bandwidth) .setLineUp(lineUp) .setSpeed(speed); new EqualsTester() .addEqualityGroup( irdBuilder.build(), new InterfaceRuntimeData(address, bandwidth, lineUp, speed)) .addEqualityGroup(irdBuilder.setBandwidth(bandwidth + 1).build()) .addEqualityGroup(irdBuilder.setLineUp(!lineUp).build()) .addEqualityGroup(irdBuilder.setSpeed(speed + 1).build()) .addEqualityGroup( irdBuilder.setAddress(ConcreteInterfaceAddress.parse("1.2.3.1/24")).build()) .addEqualityGroup(irdBuilder.setBandwidth(null).build()) .addEqualityGroup(irdBuilder.setLineUp(null).build()) .addEqualityGroup(irdBuilder.setAddress(null).build()) .addEqualityGroup(irdBuilder.setSpeed(null).build(), InterfaceRuntimeData.builder().build()) .testEquals(); }
static Builder builder() { return new Builder(); }
InterfaceRuntimeData { static Builder builder() { return new Builder(); } }
InterfaceRuntimeData { static Builder builder() { return new Builder(); } @JsonCreator @VisibleForTesting  InterfaceRuntimeData(
      @Nullable @JsonProperty(PROP_ADDRESS) ConcreteInterfaceAddress address,
      @Nullable @JsonProperty(PROP_BANDWIDTH) Double bandwidth,
      @Nullable @JsonProperty(PROP_LINE_UP) Boolean lineUp,
      @Nullable @JsonProperty(PROP_SPEED) Double speed); }
InterfaceRuntimeData { static Builder builder() { return new Builder(); } @JsonCreator @VisibleForTesting  InterfaceRuntimeData(
      @Nullable @JsonProperty(PROP_ADDRESS) ConcreteInterfaceAddress address,
      @Nullable @JsonProperty(PROP_BANDWIDTH) Double bandwidth,
      @Nullable @JsonProperty(PROP_LINE_UP) Boolean lineUp,
      @Nullable @JsonProperty(PROP_SPEED) Double speed); @JsonProperty(PROP_ADDRESS) @Nullable ConcreteInterfaceAddress getAddress(); @JsonProperty(PROP_BANDWIDTH) @Nullable Double getBandwidth(); @JsonProperty(PROP_LINE_UP) @Nullable Boolean getLineUp(); @JsonProperty(PROP_SPEED) @Nullable Double getSpeed(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); }
InterfaceRuntimeData { static Builder builder() { return new Builder(); } @JsonCreator @VisibleForTesting  InterfaceRuntimeData(
      @Nullable @JsonProperty(PROP_ADDRESS) ConcreteInterfaceAddress address,
      @Nullable @JsonProperty(PROP_BANDWIDTH) Double bandwidth,
      @Nullable @JsonProperty(PROP_LINE_UP) Boolean lineUp,
      @Nullable @JsonProperty(PROP_SPEED) Double speed); @JsonProperty(PROP_ADDRESS) @Nullable ConcreteInterfaceAddress getAddress(); @JsonProperty(PROP_BANDWIDTH) @Nullable Double getBandwidth(); @JsonProperty(PROP_LINE_UP) @Nullable Boolean getLineUp(); @JsonProperty(PROP_SPEED) @Nullable Double getSpeed(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString();  }