private void addMapping(WMFullResourcePlan fullRp, String type, String name, String poolName) {
    WMMapping mapping = new WMMapping(fullRp.getPlan().getName(), type, name);
    mapping.setPoolPath(poolName);
    fullRp.addToMappings(mapping);
  }
Test class for json resource plan formatter.
ql/src/test/org/apache/hadoop/hive/ql/metadata/formatting/TestJsonRPFormatter.java