@Test
public void testSpecifiedUserPolicy() throws Exception {

  StringBuffer sb = new StringBuffer();
  sb.append("<queuePlacementPolicy>");
  sb.append("  <rule name='specified' />");
  sb.append("  <rule name='user' />");
  sb.append("</queuePlacementPolicy>");
  QueuePlacementPolicy policy = parse(sb.toString());
  assertEquals("root.specifiedq",
      policy.assignAppToQueue("specifiedq", "someuser"));
  assertEquals("root.someuser",
      policy.assignAppToQueue("default", "someuser"));
  assertEquals("root.otheruser",
      policy.assignAppToQueue("default", "otheruser"));
}