@Test public void testToLogicalEdgeNode2Absent() { String c1Name = "c1"; String c2Name = "c2"; String iName = "i1"; Configuration c1 = _cb.setHostname(c1Name).build(); Vrf v1 = _vb.setOwner(c1).build(); _ib.setOwner(c1).setVrf(v1); _ib.setName(iName).build(); Configuration c2 = _cb.setHostname(c2Name).build(); Vrf v2 = _vb.setOwner(c2).build(); _ib.setOwner(c2).setVrf(v2); _ib.setName(iName).build().setChannelGroup("missing"); NetworkConfigurations networkConfigurations = NetworkConfigurations.of(ImmutableSortedMap.of(c1Name, c1, c2Name, c2)); Layer1Edge edge = new Layer1Edge(new Layer1Node(c1Name, iName), new Layer1Node(c2Name, iName)); assertThat(edge.toLogicalEdge(networkConfigurations), nullValue()); }
public @Nullable Layer1Edge toLogicalEdge(NetworkConfigurations networkConfigurations) { Layer1Node node1 = _node1.toLogicalNode(networkConfigurations); Layer1Node node2 = _node2.toLogicalNode(networkConfigurations); if (node1 == null || node2 == null) { return null; } return new Layer1Edge(node1, node2); }
Layer1Edge implements Comparable<Layer1Edge> { public @Nullable Layer1Edge toLogicalEdge(NetworkConfigurations networkConfigurations) { Layer1Node node1 = _node1.toLogicalNode(networkConfigurations); Layer1Node node2 = _node2.toLogicalNode(networkConfigurations); if (node1 == null || node2 == null) { return null; } return new Layer1Edge(node1, node2); } }
Layer1Edge implements Comparable<Layer1Edge> { public @Nullable Layer1Edge toLogicalEdge(NetworkConfigurations networkConfigurations) { Layer1Node node1 = _node1.toLogicalNode(networkConfigurations); Layer1Node node2 = _node2.toLogicalNode(networkConfigurations); if (node1 == null || node2 == null) { return null; } return new Layer1Edge(node1, node2); } Layer1Edge(Layer1Node node1, Layer1Node node2);  Layer1Edge(
      @Nonnull String node1Hostname,
      @Nonnull String node1InterfaceName,
      @Nonnull String node2Hostname,
      @Nonnull String node2InterfaceName); }
Layer1Edge implements Comparable<Layer1Edge> { public @Nullable Layer1Edge toLogicalEdge(NetworkConfigurations networkConfigurations) { Layer1Node node1 = _node1.toLogicalNode(networkConfigurations); Layer1Node node2 = _node2.toLogicalNode(networkConfigurations); if (node1 == null || node2 == null) { return null; } return new Layer1Edge(node1, node2); } Layer1Edge(Layer1Node node1, Layer1Node node2);  Layer1Edge(
      @Nonnull String node1Hostname,
      @Nonnull String node1InterfaceName,
      @Nonnull String node2Hostname,
      @Nonnull String node2InterfaceName); @Override int compareTo(Layer1Edge o); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_NODE1) @Nonnull Layer1Node getNode1(); @JsonProperty(PROP_NODE2) @Nonnull Layer1Node getNode2(); @Override int hashCode(); @Nonnull Layer1Edge reverse(); @Nullable Layer1Edge toLogicalEdge(NetworkConfigurations networkConfigurations); @Override String toString(); }
Layer1Edge implements Comparable<Layer1Edge> { public @Nullable Layer1Edge toLogicalEdge(NetworkConfigurations networkConfigurations) { Layer1Node node1 = _node1.toLogicalNode(networkConfigurations); Layer1Node node2 = _node2.toLogicalNode(networkConfigurations); if (node1 == null || node2 == null) { return null; } return new Layer1Edge(node1, node2); } Layer1Edge(Layer1Node node1, Layer1Node node2);  Layer1Edge(
      @Nonnull String node1Hostname,
      @Nonnull String node1InterfaceName,
      @Nonnull String node2Hostname,
      @Nonnull String node2InterfaceName); @Override int compareTo(Layer1Edge o); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_NODE1) @Nonnull Layer1Node getNode1(); @JsonProperty(PROP_NODE2) @Nonnull Layer1Node getNode2(); @Override int hashCode(); @Nonnull Layer1Edge reverse(); @Nullable Layer1Edge toLogicalEdge(NetworkConfigurations networkConfigurations); @Override String toString();  }