@Override
    public boolean equals(Object object) {
        if (object != null && getClass() == object.getClass()) {
            if (!super.equals(object)) {
                return false;
            }
            DefaultLinkDescription that = (DefaultLinkDescription) object;
            return Objects.equal(this.src, that.src)
                    && Objects.equal(this.dst, that.dst)
                    && Objects.equal(this.type, that.type)
                    && Objects.equal(this.isExpected, that.isExpected);
        }
        return false;
    }
@Test
    public void testEquals() {
        ConnectPoint connectPoint1 = NetTestTools.connectPoint("sw1", 1);
        ConnectPoint connectPoint2 = NetTestTools.connectPoint("sw2", 2);
        ConnectPoint connectPoint3 = NetTestTools.connectPoint("sw3", 3);

        DefaultLinkDescription link1 =
                new DefaultLinkDescription(connectPoint1, connectPoint2,
                                           Link.Type.DIRECT);
        DefaultLinkDescription sameAsLink1 =
                new DefaultLinkDescription(connectPoint1, connectPoint2,
                                           Link.Type.DIRECT);
        DefaultLinkDescription link2 =
                new DefaultLinkDescription(connectPoint1, connectPoint2,
                                           Link.Type.INDIRECT);
        DefaultLinkDescription link3 =
                new DefaultLinkDescription(connectPoint1, connectPoint3,
                                           Link.Type.DIRECT);
        DefaultLinkDescription link4 =
                new DefaultLinkDescription(connectPoint2, connectPoint3,
                                           Link.Type.DIRECT);
        DefaultLinkDescription link5 =
                new DefaultLinkDescription(connectPoint1, connectPoint2,
                                           Link.Type.DIRECT, false);
        DefaultLinkDescription link6 =
                new DefaultLinkDescription(connectPoint2, connectPoint3,
                                           Link.Type.DIRECT, DA);

        new EqualsTester()
                .addEqualityGroup(link1, sameAsLink1)
                .addEqualityGroup(link2)
                .addEqualityGroup(link3)
                .addEqualityGroup(link4)
                .addEqualityGroup(link5)
                .addEqualityGroup(link6)
                .testEquals();

    }