@Test
public void testMultipleParentRules() throws Exception {

  StringBuffer sb = new StringBuffer();
  sb.append("<queuePlacementPolicy>");
  sb.append("  <rule name='nestedUserQueue'>");
  sb.append("    <rule name='primaryGroup'/>");
  sb.append("    <rule name='default'/>");
  sb.append("  </rule>");
  sb.append("</queuePlacementPolicy>");
  createPolicy(sb.toString());
  PlacementRule nested = placementManager.getPlacementRules().get(0);
  if (nested instanceof UserPlacementRule) {
    PlacementRule parent = ((FSPlacementRule)nested).getParentRule();
    assertTrue("Nested rule should have been Default rule",
        parent instanceof DefaultPlacementRule);
  } else {
    fail("Policy parsing failed: rule with multiple parents not set");
  }
}