@Test public void testEquals() { Trace trace1 = trace("n1"); Trace trace2 = trace("n2"); Flow flow1 = Flow.builder().setIngressNode("n1").build(); Flow flow2 = Flow.builder().setIngressNode("n2").build(); List<FirewallSessionTraceInfo> sessions1 = sessions("n1"); List<FirewallSessionTraceInfo> sessions2 = sessions("n2"); new EqualsTester() .addEqualityGroup( new TraceAndReverseFlow(trace1, flow1, sessions1), new TraceAndReverseFlow(trace1, flow1, sessions1)) .addEqualityGroup(new TraceAndReverseFlow(trace2, flow1, sessions1)) .addEqualityGroup(new TraceAndReverseFlow(trace1, flow2, sessions1)) .addEqualityGroup(new TraceAndReverseFlow(trace1, flow1, sessions2)) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TraceAndReverseFlow)) { return false; } TraceAndReverseFlow that = (TraceAndReverseFlow) o; return _trace.equals(that._trace) && Objects.equals(_reverseFlow, that._reverseFlow) && _newFirewallSessions.equals(that._newFirewallSessions); }
TraceAndReverseFlow { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TraceAndReverseFlow)) { return false; } TraceAndReverseFlow that = (TraceAndReverseFlow) o; return _trace.equals(that._trace) && Objects.equals(_reverseFlow, that._reverseFlow) && _newFirewallSessions.equals(that._newFirewallSessions); } }
TraceAndReverseFlow { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TraceAndReverseFlow)) { return false; } TraceAndReverseFlow that = (TraceAndReverseFlow) o; return _trace.equals(that._trace) && Objects.equals(_reverseFlow, that._reverseFlow) && _newFirewallSessions.equals(that._newFirewallSessions); } TraceAndReverseFlow(
      @Nonnull Trace trace,
      @Nullable Flow reverseFlow,
      @Nonnull Iterable<FirewallSessionTraceInfo> newFirewallSessions); }
TraceAndReverseFlow { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TraceAndReverseFlow)) { return false; } TraceAndReverseFlow that = (TraceAndReverseFlow) o; return _trace.equals(that._trace) && Objects.equals(_reverseFlow, that._reverseFlow) && _newFirewallSessions.equals(that._newFirewallSessions); } TraceAndReverseFlow(
      @Nonnull Trace trace,
      @Nullable Flow reverseFlow,
      @Nonnull Iterable<FirewallSessionTraceInfo> newFirewallSessions); @Nullable Flow getReverseFlow(); @Nonnull Trace getTrace(); @Nonnull Set<FirewallSessionTraceInfo> getNewFirewallSessions(); @Override boolean equals(Object o); @Override int hashCode(); }
TraceAndReverseFlow { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TraceAndReverseFlow)) { return false; } TraceAndReverseFlow that = (TraceAndReverseFlow) o; return _trace.equals(that._trace) && Objects.equals(_reverseFlow, that._reverseFlow) && _newFirewallSessions.equals(that._newFirewallSessions); } TraceAndReverseFlow(
      @Nonnull Trace trace,
      @Nullable Flow reverseFlow,
      @Nonnull Iterable<FirewallSessionTraceInfo> newFirewallSessions); @Nullable Flow getReverseFlow(); @Nonnull Trace getTrace(); @Nonnull Set<FirewallSessionTraceInfo> getNewFirewallSessions(); @Override boolean equals(Object o); @Override int hashCode();  }