public void testRoutingPolicy()
{
RoutingTypeRange rtr = new RoutingTypeRange ((short)10, (short)20);
Any value = create_any();
RoutingTypeRangeHelper.insert (value, rtr);
RoutingPolicy p = (RoutingPolicy)create_policy
(
ROUTING_POLICY_TYPE.value,
value
);
assertEquals (ROUTING_POLICY_TYPE.value, p.policy_type());
RoutingTypeRange outRTR = p.routing_range();
assertEquals (rtr.min, outRTR.min);
assertEquals (rtr.max, outRTR.max);
RoutingPolicy p2 = (RoutingPolicy)p.copy();
RoutingTypeRange otherRTR = p2.routing_range();
assertEquals (outRTR.min, otherRTR.min);
assertEquals (outRTR.max, otherRTR.max);
p.destroy();
p2.destroy();
}