@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        final PiActionProfileGroup other = (PiActionProfileGroup) obj;
        return Objects.equal(this.groupId, other.groupId)
                && Objects.equal(this.members, other.members)
                // FIXME: re-enable when this PI bug will be fixed:
                // https://github.com/p4lang/PI/issues/452
                // Currently PI-based devices always return max_group_size 0,
                // event if we set a different one.
                // && Objects.equal(this.maxSize, other.maxSize)
                && Objects.equal(this.actionProfileId, other.actionProfileId);
    }
@Test
    public void testEquals() {

        new EqualsTester()
                .addEqualityGroup(group1, sameAsGroup1, sameAsGroup1NoInstance)
                .addEqualityGroup(group2, sameAsGroup2NoInstance)
                .addEqualityGroup(asGroup2WithDifferentWeights)
                .testEquals();
    }