String renderInstructionForDisplay(Instruction instr) {

        // special handling for Extension Instruction Wrappers...
        if (instr instanceof Instructions.ExtensionInstructionWrapper) {
            Instructions.ExtensionInstructionWrapper wrap =
                    (Instructions.ExtensionInstructionWrapper) instr;
            return wrap.type() + COLON + wrap.extensionInstruction();
        }

        // special handling of other instruction classes could be placed here

        // default to the natural string representation otherwise
        return instr.toString();
    }
@Test
    public void renderExtensionInstruction() {
        title("renderExtensionInstruction");

        ExtensionTreatment extn = new Ofdpa3SetMplsType((short) 32);
        DeviceId devid = deviceId(DEV_OF_204);

        instr = Instructions.extension(extn, devid);
        string = instr.toString();
        render = handler.renderInstructionForDisplay(instr);

        print(string);
        print(render);

        assertEquals("unexpected toString", EXT_FULL_STR, string);
        assertEquals("unexpected short string", EXT_NO_DPID, render);
    }