@Test public void testKey() { Flow flow1 = Flow.builder().setIngressNode("ingressNode").setDstIp(Ip.ZERO).build(); Flow flow2 = Flow.builder().setIngressNode("ingressNode").setDstIp(Ip.MAX).build(); SessionMatchExpr dummySessionMatch = new SessionMatchExpr(IpProtocol.TCP, Ip.parse("1.1.1.1"), Ip.parse("2.2.2.2"), null, null); Trace successTrace = new Trace(ACCEPTED, ImmutableList.of()); assertThat( new BidirectionalTrace(flow1, successTrace, ImmutableSet.of(), flow2, successTrace) .getKey(), equalTo(new Key(flow1, ImmutableSet.of(), flow2))); assertThat( new BidirectionalTrace(flow2, successTrace, ImmutableSet.of(), flow1, successTrace) .getKey(), equalTo(new Key(flow2, ImmutableSet.of(), flow1))); FirewallSessionTraceInfo session = new FirewallSessionTraceInfo( "hostname", Accept.INSTANCE, ImmutableSet.of(), dummySessionMatch, null); Trace failTrace = new Trace(DENIED_IN, ImmutableList.of()); assertThat( new BidirectionalTrace(flow1, failTrace, ImmutableSet.of(session), null, null).getKey(), equalTo(new Key(flow1, ImmutableSet.of(session), null))); }
@Nonnull public Key getKey() { return new Key(_forwardFlow, _newSessions, _reverseFlow); }
BidirectionalTrace { @Nonnull public Key getKey() { return new Key(_forwardFlow, _newSessions, _reverseFlow); } }
BidirectionalTrace { @Nonnull public Key getKey() { return new Key(_forwardFlow, _newSessions, _reverseFlow); } BidirectionalTrace(
      Flow forwardFlow,
      Trace forwardTrace,
      @Nonnull Set<FirewallSessionTraceInfo> newSessions,
      @Nullable Flow reverseFlow,
      @Nullable Trace reverseTrace); }
BidirectionalTrace { @Nonnull public Key getKey() { return new Key(_forwardFlow, _newSessions, _reverseFlow); } BidirectionalTrace(
      Flow forwardFlow,
      Trace forwardTrace,
      @Nonnull Set<FirewallSessionTraceInfo> newSessions,
      @Nullable Flow reverseFlow,
      @Nullable Trace reverseTrace); @Override boolean equals(Object o); @Override int hashCode(); @Nonnull Flow getForwardFlow(); @Nonnull Trace getForwardTrace(); @Nonnull Key getKey(); @Nonnull Set<FirewallSessionTraceInfo> getNewSessions(); @Nullable Flow getReverseFlow(); @Nullable Trace getReverseTrace(); }
BidirectionalTrace { @Nonnull public Key getKey() { return new Key(_forwardFlow, _newSessions, _reverseFlow); } BidirectionalTrace(
      Flow forwardFlow,
      Trace forwardTrace,
      @Nonnull Set<FirewallSessionTraceInfo> newSessions,
      @Nullable Flow reverseFlow,
      @Nullable Trace reverseTrace); @Override boolean equals(Object o); @Override int hashCode(); @Nonnull Flow getForwardFlow(); @Nonnull Trace getForwardTrace(); @Nonnull Key getKey(); @Nonnull Set<FirewallSessionTraceInfo> getNewSessions(); @Nullable Flow getReverseFlow(); @Nullable Trace getReverseTrace();  }