public void testRequestPriorityPolicy()
{
PriorityRange pr = new PriorityRange ((short)10, (short)20);
Any value = create_any();
PriorityRangeHelper.insert (value, pr);
RequestPriorityPolicy p = (RequestPriorityPolicy)create_policy
(
REQUEST_PRIORITY_POLICY_TYPE.value,
value
);
assertEquals (REQUEST_PRIORITY_POLICY_TYPE.value, p.policy_type());
PriorityRange outPR = p.priority_range();
assertEquals (pr.min, outPR.min);
assertEquals (pr.max, outPR.max);
RequestPriorityPolicy p2 = (RequestPriorityPolicy)p.copy();
PriorityRange otherPR = p2.priority_range();
assertEquals (outPR.min, otherPR.min);
assertEquals (outPR.max, otherPR.max);
p.destroy();
p2.destroy();
}