public void testAnnotationEndpointScopePolicies() throws Exception
{
Map<String, Class> map = new HashMap<String, Class>();
map.put("http://www.fabrikam123.example.com/stock", NopAssertionDeployer.class);
PolicyDeployer deployer = PolicyDeployer.newInstance(map);
PolicyMetaDataBuilder builder = new PolicyMetaDataBuilder(deployer);
builder.setToolMode(true);
UnifiedVirtualFile vfRoot = new URLLoaderAdapter(new File("resources/jaxws/wspolicy").toURL());
UnifiedMetaData umd = new UnifiedMetaData(vfRoot);
ServiceMetaData serviceMetaData = new ServiceMetaData(umd, new QName("dummyServiceName"));
umd.addService(serviceMetaData);
EndpointMetaData epMetaData = new ServerEndpointMetaData(serviceMetaData, null, new QName("dummyPortName"), new QName("dummyPortTypeName"), Type.JAXWS);
serviceMetaData.addEndpoint(epMetaData);
builder.processPolicyAnnotations(epMetaData, TestMultipleEndpointPolicy.class);
PolicyMetaExtension policyExt = (PolicyMetaExtension)epMetaData.getExtension(Constants.URI_WS_POLICY);
Collection<Policy> portPolicies = policyExt.getPolicies(PolicyScopeLevel.WSDL_PORT);
assertNotNull(portPolicies);