@Override
    public ObjectNode encode(MappingInstruction instruction, CodecContext context) {
        checkNotNull(instruction, "Mapping instruction cannot be null");

        return new EncodeMappingInstructionCodecHelper(instruction, context).encode();
    }
@Test
    public void unicastWeightInstrutionTest() {
        final UnicastMappingInstruction.WeightMappingInstruction instruction =
                (UnicastMappingInstruction.WeightMappingInstruction)
                        MappingInstructions.unicastWeight(UNICAST_WEIGHT);
        final ObjectNode instructionJson =
                instructionCodec.encode(instruction, context);
        assertThat(instructionJson, matchesInstruction(instruction));
    }