code: private Integer getPriority(Map<String, Object> mutableRData) {
      Integer priority = null;
  
      if (mutableRData.containsKey("priority")) { // SRVData
        priority = Integer.class.cast(mutableRData.remove("priority"));
      } else if (mutableRData.containsKey("preference")) { // MXData
        priority = Integer.class.cast(mutableRData.remove("preference"));
      }
  
      return priority;
    }
docs: Has the side effect of removing the priority from the mutableRData.
  
  @return null or the priority, if it exists for a MX or SRV record