/**
   * Matches the contents of a mod vlan pcp instruction.
   *
   * @param instructionJson JSON instruction to match
   * @param description Description object used for recording errors
   * @return true if contents match, false otherwise
   */
  private boolean matchModVlanPcpInstruction(JsonNode instructionJson, Description description) {
    ModVlanPcpInstruction instructionToMatch = (ModVlanPcpInstruction) instruction;
    final String jsonSubtype = instructionJson.get("subtype").textValue();
    if (!instructionToMatch.subtype().name().equals(jsonSubtype)) {
      description.appendText("subtype was " + jsonSubtype);
      return false;
    }

    final String jsonType = instructionJson.get("type").textValue();
    if (!instructionToMatch.type().name().equals(jsonType)) {
      description.appendText("type was " + jsonType);
      return false;
    }

    final short jsonVlanPcp = instructionJson.get("vlanPcp").shortValue();
    final short vlanId = instructionToMatch.vlanPcp();
    if (jsonVlanPcp != vlanId) {
      description.appendText("vlan pcp was " + jsonVlanPcp);
      return false;
    }

    return true;
  }