public void testClientProtocolPolicy()
{
Protocol[] protocols = new Protocol[] { };
Any value = create_any();
ProtocolListHelper.insert (value, protocols);
ClientProtocolPolicy p = (ClientProtocolPolicy)create_policy
(
CLIENT_PROTOCOL_POLICY_TYPE.value,
value
);
assertEquals (p.policy_type(), CLIENT_PROTOCOL_POLICY_TYPE.value);
ClientProtocolPolicy p2 = (ClientProtocolPolicy)p.copy();
// accessing the tag does not work when the protocols list is empty
// assertEquals (((org.jacorb.orb.policies.ClientProtocolPolicy)p).tag(),
// ((org.jacorb.orb.policies.ClientProtocolPolicy)p2).tag());
assertTrue ("Protocols do not match", p.protocols().equals(p2.protocols()));
p.destroy();
p2.destroy();
}