@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof DefaultMappingValue) {
            DefaultMappingValue that = (DefaultMappingValue) obj;
            return Objects.equals(action, that.action) &&
                    Objects.equals(treatments, that.treatments);
        }
        return false;
    }
@Test
    public void testEquals() {
        MappingTreatment treatment1 = DefaultMappingTreatment.builder()
                                                .withAddress(ma1)
                                                .setUnicastPriority(10)
                                                .setUnicastWeight(10)
                                                .build();

        MappingTreatment treatment2 = DefaultMappingTreatment.builder()
                                                .withAddress(ma2)
                                                .setUnicastPriority(20)
                                                .setUnicastWeight(20)
                                                .build();

        MappingAction noAction = MappingActions.noAction();
        MappingAction forward = MappingActions.forward();

        MappingValue value1 = DefaultMappingValue.builder()
                                        .withAction(noAction)
                                        .add(treatment1)
                                        .build();

        MappingValue sameAsValue1 = DefaultMappingValue.builder()
                                        .withAction(noAction)
                                        .add(treatment1)
                                        .build();

        MappingValue value2 = DefaultMappingValue.builder()
                                        .withAction(forward)
                                        .add(treatment2)
                                        .build();

        new EqualsTester()
                .addEqualityGroup(value1, sameAsValue1)
                .addEqualityGroup(value2)
                .testEquals();
    }