@Test public void testEquality() { DefaultVirtualDevice device1 = new DefaultVirtualDevice(NetworkId.networkId(0), DeviceId.deviceId(deviceIdValue1)); DefaultVirtualDevice device2 = new DefaultVirtualDevice(NetworkId.networkId(0), DeviceId.deviceId(deviceIdValue1)); DefaultVirtualDevice device3 = new DefaultVirtualDevice(NetworkId.networkId(0), DeviceId.deviceId(deviceIdValue2)); DefaultVirtualDevice device4 = new DefaultVirtualDevice(NetworkId.networkId(1), DeviceId.deviceId(deviceIdValue1)); new EqualsTester().addEqualityGroup(device1, device2).addEqualityGroup(device3) .addEqualityGroup(device4).testEquals(); }
@Override public NetworkId networkId() { return networkId; }
DefaultVirtualDevice extends DefaultDevice implements VirtualDevice { @Override public NetworkId networkId() { return networkId; } }
DefaultVirtualDevice extends DefaultDevice implements VirtualDevice { @Override public NetworkId networkId() { return networkId; } DefaultVirtualDevice(NetworkId networkId, DeviceId id); }
DefaultVirtualDevice extends DefaultDevice implements VirtualDevice { @Override public NetworkId networkId() { return networkId; } DefaultVirtualDevice(NetworkId networkId, DeviceId id); @Override NetworkId networkId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
DefaultVirtualDevice extends DefaultDevice implements VirtualDevice { @Override public NetworkId networkId() { return networkId; } DefaultVirtualDevice(NetworkId networkId, DeviceId id); @Override NetworkId networkId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }