@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof BandwidthProfile) {
            final BandwidthProfile that = (BandwidthProfile) obj;
            return this.getClass() == that.getClass() &&
                    Objects.equals(this.cir, that.cir) &&
                    Objects.equals(this.pir, that.pir)  &&
                    Objects.equals(this.cbs, that.cbs) &&
                    Objects.equals(this.pbs, that.pbs)  &&
                    Objects.equals(this.ebs, that.ebs) &&
                    Objects.equals(this.greenAction, that.greenAction)  &&
                    Objects.equals(this.yellowAction, that.yellowAction) &&
                    Objects.equals(this.redAction, that.redAction) &&
                    Objects.equals(this.colorAware, that.colorAware);
        }
        return false;
    }
@Test
    public void testEquals() {
        BandwidthProfile bwProfile1 = new BandwidthProfile.Builder()
                .name("profile1")
                .cir(Bandwidth.bps(ONE_M))
                .cbs((int) ONE_K)
                .pir(Bandwidth.bps(TEN_M))
                .pbs((int) TWO_K)
                .greenAction(getBuilder(Action.PASS).build())
                .yellowAction(getBuilder(Action.REMARK)
                                      .dscpClass(DscpClass.AF11)
                                      .build())
                .redAction(getBuilder(Action.DISCARD).build())
                .colorAware(false)
                .build();
        BandwidthProfile bwProfile2 = new BandwidthProfile.Builder()
                .name("profile2")
                .cir(Bandwidth.bps(ONE_M))
                .cbs((int) ONE_K)
                .pir(Bandwidth.bps(TEN_M))
                .pbs((int) TWO_K)
                .greenAction(getBuilder(Action.PASS).build())
                .yellowAction(getBuilder(Action.REMARK)
                                      .dscpClass(DscpClass.AF11)
                                      .build())
                .redAction(getBuilder(Action.DISCARD).build())
                .colorAware(false)
                .build();
        assertTrue("wrong equals method", bwProfile1.equals(bwProfile2));
    }