@Test public void testEquality() { DefaultVirtualNetwork network1 = new DefaultVirtualNetwork(NetworkId.networkId(0), TenantId.tenantId(tenantIdValue1)); DefaultVirtualNetwork network2 = new DefaultVirtualNetwork(NetworkId.networkId(0), TenantId.tenantId(tenantIdValue1)); DefaultVirtualNetwork network3 = new DefaultVirtualNetwork(NetworkId.networkId(0), TenantId.tenantId(tenantIdValue2)); DefaultVirtualNetwork network4 = new DefaultVirtualNetwork(NetworkId.networkId(1), TenantId.tenantId(tenantIdValue2)); new EqualsTester().addEqualityGroup(network1, network2).addEqualityGroup(network3) .addEqualityGroup(network4).testEquals(); }
@Override public TenantId tenantId() { return tenantId; }
DefaultVirtualNetwork implements VirtualNetwork { @Override public TenantId tenantId() { return tenantId; } }
DefaultVirtualNetwork implements VirtualNetwork { @Override public TenantId tenantId() { return tenantId; } DefaultVirtualNetwork(NetworkId id, TenantId tenantId); }
DefaultVirtualNetwork implements VirtualNetwork { @Override public TenantId tenantId() { return tenantId; } DefaultVirtualNetwork(NetworkId id, TenantId tenantId); @Override NetworkId id(); @Override TenantId tenantId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
DefaultVirtualNetwork implements VirtualNetwork { @Override public TenantId tenantId() { return tenantId; } DefaultVirtualNetwork(NetworkId id, TenantId tenantId); @Override NetworkId id(); @Override TenantId tenantId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }