@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof DefaultMappingTreatment) {
            DefaultMappingTreatment that = (DefaultMappingTreatment) obj;
            return Objects.equals(address, that.address) &&
                    Objects.equals(instructions, that.instructions);
        }
        return false;
    }
@Test
    public void testEquals() {
        IpPrefix ip1 = IpPrefix.valueOf(IP_ADDRESS_1);
        MappingAddress address1 = MappingAddresses.ipv4MappingAddress(ip1);

        MappingTreatment treatment1 = DefaultMappingTreatment.builder()
                                    .withAddress(address1)
                                    .setUnicastPriority(10)
                                    .setUnicastWeight(10)
                                    .build();

        MappingTreatment sameAsTreatment1 = DefaultMappingTreatment.builder()
                                    .withAddress(address1)
                                    .setUnicastPriority(10)
                                    .setUnicastWeight(10)
                                    .build();

        IpPrefix ip2 = IpPrefix.valueOf(IP_ADDRESS_2);
        MappingAddress address2 = MappingAddresses.ipv4MappingAddress(ip2);

        MappingTreatment treatment2 = DefaultMappingTreatment.builder()
                                    .withAddress(address2)
                                    .setMulticastPriority(20)
                                    .setMulticastWeight(20)
                                    .build();

        new EqualsTester()
                .addEqualityGroup(treatment1, sameAsTreatment1)
                .addEqualityGroup(treatment2)
                .testEquals();
    }