cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1240348 - in /cxf/trunk/rt/ws: policy/src/main/java/org/apache/cxf/ws/policy/ policy/src/test/java/org/apache/cxf/ws/policy/ rm/src/main/java/org/apache/cxf/ws/rm/ rm/src/test/java/org/apache/cxf/ws/rm/
Date Fri, 03 Feb 2012 21:33:08 GMT
Author: dkulp
Date: Fri Feb  3 21:33:07 2012
New Revision: 1240348

URL: http://svn.apache.org/viewvc?rev=1240348&view=rev
Log:
[CXF-4073] Support for mulitple policy interceptor providers per
assertion

Modified patch from Andrei Shakirin applied

Modified:
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistry.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImpl.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
    cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
Fri Feb  3 21:33:07 2012
@@ -215,16 +215,15 @@ public class EffectivePolicyImpl impleme
         return alternatives;
     }
 
-    void initialiseInterceptors(PolicyInterceptorProviderRegistry reg,
-                                PolicyEngineImpl engine,
-                                Set<Interceptor<? extends org.apache.cxf.message.Message>>
out,
-                                Assertion a,
+    void initialiseInterceptors(PolicyInterceptorProviderRegistry reg, PolicyEngineImpl engine,
+                                Set<Interceptor<? extends org.apache.cxf.message.Message>>
out, Assertion a,
                                 boolean usIn) {
         QName qn = a.getName();
-        PolicyInterceptorProvider pp = reg.get(qn);
-        if (null != pp) {
-            out.addAll(usIn ? pp.getInInterceptors() : pp.getOutInterceptors());
-        }
+        List<Interceptor<? extends org.apache.cxf.message.Message>> i = 
+            usIn ? reg.getInInterceptorsForAssertion(qn) 
+                : reg.getOutInterceptorsForAssertion(qn);
+        out.addAll(i);
+
         if (a instanceof PolicyContainingAssertion) {
             Policy p = ((PolicyContainingAssertion)a).getPolicy();
             if (p != null) {

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
Fri Feb  3 21:33:07 2012
@@ -251,14 +251,13 @@ public class EndpointPolicyImpl implemen
     }
 
     void initializeInterceptors(PolicyInterceptorProviderRegistry reg,
-                                Set<Interceptor<? extends Message>> out,
-                                Assertion a, 
+                                Set<Interceptor<? extends Message>> out, Assertion
a, 
                                 boolean fault) {
         QName qn = a.getName();
-        PolicyInterceptorProvider pp = reg.get(qn);
-        if (null != pp) {
-            out.addAll(fault ? pp.getInFaultInterceptors() : pp.getInInterceptors());
-        }
+        List<Interceptor<? extends org.apache.cxf.message.Message>> i 
+            = fault ? reg.getInFaultInterceptorsForAssertion(qn)
+            : reg.getInInterceptorsForAssertion(qn);
+        out.addAll(i);
         if (a instanceof PolicyContainingAssertion) {
             Policy p = ((PolicyContainingAssertion)a).getPolicy();
             if (p != null) {

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java (original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java Fri
Feb  3 21:33:07 2012
@@ -569,7 +569,7 @@ public class PolicyEngineImpl implements
             if (pc instanceof Assertion) {
                 Assertion a = (Assertion)pc;
                 if (!(a.isOptional() 
-                    || (null != pipr.get(a.getName())) 
+                    || !pipr.get(a.getName()).isEmpty() 
                     || (null != assertor && assertor.canAssert(a.getName())))) {
                 
                     LOG.fine("Alternative " + a.getName() + " is not supported");

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistry.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistry.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistry.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistry.java
Fri Feb  3 21:33:07 2012
@@ -21,6 +21,7 @@ package org.apache.cxf.ws.policy;
 
 import java.util.Collection;
 import java.util.List;
+import java.util.Set;
 
 import javax.xml.namespace.QName;
 
@@ -35,7 +36,7 @@ import org.apache.neethi.Assertion;
  * assertion domain specific interceptors.
  */
 public interface PolicyInterceptorProviderRegistry 
-    extends Registry<QName, PolicyInterceptorProvider> {
+    extends Registry<QName, Set<PolicyInterceptorProvider>> {
     
     /**
      * Register the builder for all qnames from the provider
@@ -44,7 +45,15 @@ public interface PolicyInterceptorProvid
      */
     void register(PolicyInterceptorProvider provider);
     
-    List<Interceptor<? extends Message>> getInterceptors(Collection<? extends
Assertion> alterative, 
-                                                         boolean out, boolean fault);
+    List<Interceptor<? extends Message>> 
+    getInterceptorsForAlternative(Collection<? extends Assertion> alterative,
+                                  boolean out, boolean fault);
 
+    List<Interceptor<? extends Message>> getInInterceptorsForAssertion(QName
qn);
+
+    List<Interceptor<? extends Message>> getInFaultInterceptorsForAssertion(QName
qn);
+
+    List<Interceptor<? extends Message>> getOutInterceptorsForAssertion(QName
qn);
+
+    List<Interceptor<? extends Message>> getOutFaultInterceptorsForAssertion(QName
qn);
 }

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImpl.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImpl.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImpl.java
Fri Feb  3 21:33:07 2012
@@ -21,8 +21,11 @@ package org.apache.cxf.ws.policy;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 import javax.annotation.Resource;
 import javax.xml.namespace.QName;
@@ -42,7 +45,7 @@ import org.apache.neethi.Assertion;
  */
 @NoJSR250Annotations(unlessNull = "bus")
 public class PolicyInterceptorProviderRegistryImpl 
-    extends RegistryImpl<QName, PolicyInterceptorProvider> 
+    extends RegistryImpl<QName, Set<PolicyInterceptorProvider>> 
     implements PolicyInterceptorProviderRegistry, BusExtension {
 
     private Bus bus;
@@ -56,17 +59,20 @@ public class PolicyInterceptorProviderRe
         setBus(b);
     }
 
-    public PolicyInterceptorProviderRegistryImpl(Map<QName, PolicyInterceptorProvider>
interceptors) {
+    public PolicyInterceptorProviderRegistryImpl(Map<QName, Set<PolicyInterceptorProvider>>
interceptors) {
         super(interceptors);
     }    
-    public PolicyInterceptorProviderRegistryImpl(MapProvider<QName, PolicyInterceptorProvider>
interceptors) {
+    public PolicyInterceptorProviderRegistryImpl(MapProvider<QName, 
+                                                 Set<PolicyInterceptorProvider>>
interceptors) {
         super(interceptors.createMap());
     }    
     public PolicyInterceptorProviderRegistryImpl(Bus b, 
-                                                 MapProvider<QName, PolicyInterceptorProvider>
interceptors) {
+        MapProvider<QName, Set<PolicyInterceptorProvider>> interceptors) {
+        
         super(interceptors.createMap());
         setBus(b);
     }    
+
     @Resource
     public final void setBus(Bus b) {
         bus = b;
@@ -74,15 +80,22 @@ public class PolicyInterceptorProviderRe
             b.setExtension(this, PolicyInterceptorProviderRegistry.class);
         }
     }
+
     public void register(PolicyInterceptorProvider provider) {
         for (QName qn : provider.getAssertionTypes()) {
-            super.register(qn, provider);
+            Set<PolicyInterceptorProvider> providers = super.get(qn);
+            if (providers == null) {
+                providers = new CopyOnWriteArraySet<PolicyInterceptorProvider>();
+            }
+            providers.add(provider);
+            super.register(qn, providers);
         }
     }
 
     public Class<?> getRegistrationType() {
         return PolicyInterceptorProviderRegistry.class;
     }
+
     protected synchronized void loadDynamic() {
         if (!dynamicLoaded && bus != null) {
             dynamicLoaded = true;
@@ -95,22 +108,57 @@ public class PolicyInterceptorProviderRe
             }
         }
     }
-    public List<Interceptor<? extends Message>> getInterceptors(Collection<?
extends Assertion> alternative, 
-                                             boolean out, boolean fault) {
-        loadDynamic();
+
+    @Override
+    public Set<PolicyInterceptorProvider> get(QName qn) {
+        Set<PolicyInterceptorProvider> pps = super.get(qn);
+        if (pps == null) {
+            pps = Collections.emptySet();
+        }
+        return pps;
+    }
+
+    public List<Interceptor<? extends Message>> 
+    getInterceptorsForAlternative(Collection<? extends Assertion> alternative,
+                                  boolean out, boolean fault) {
         List<Interceptor<? extends Message>> interceptors = new ArrayList<Interceptor<?
extends Message>>();
         for (Assertion a : alternative) {
             if (a.isOptional()) {
                 continue;
             }
             QName qn = a.getName();
-            PolicyInterceptorProvider pp = get(qn);
-            if (null != pp) {
-                interceptors.addAll(out                
-                    ? (fault ? pp.getOutFaultInterceptors() : pp.getOutInterceptors())  
    
-                    : (fault ? pp.getInFaultInterceptors() : pp.getInInterceptors())); 
-            }
+            interceptors.addAll(getInterceptorsForAssertion(qn, out, fault));
         }
         return interceptors;
     }
+
+    public List<Interceptor<? extends Message>> getInInterceptorsForAssertion(QName
qn) {
+        return getInterceptorsForAssertion(qn, false, false);
+    }
+
+    public List<Interceptor<? extends Message>> getInFaultInterceptorsForAssertion(QName
qn) {
+        return getInterceptorsForAssertion(qn, false, true);
+    }
+
+    public List<Interceptor<? extends Message>> getOutInterceptorsForAssertion(QName
qn) {
+        return getInterceptorsForAssertion(qn, true, false);
+    }
+
+    public List<Interceptor<? extends Message>> getOutFaultInterceptorsForAssertion(QName
qn) {
+        return getInterceptorsForAssertion(qn, true, true);
+    }
+
+    protected List<Interceptor<? extends Message>> getInterceptorsForAssertion(QName
qn, boolean out,
+                                                                               boolean fault)
{
+        loadDynamic();
+        List<Interceptor<? extends Message>> interceptors = new ArrayList<Interceptor<?
extends Message>>();
+        Set<PolicyInterceptorProvider> pps = get(qn);
+        for (PolicyInterceptorProvider pp : pps) {
+            interceptors.addAll(out 
+                                ? (fault ? pp.getOutFaultInterceptors() : pp.getOutInterceptors())

+                                    : (fault ? pp.getInFaultInterceptors() : pp.getInInterceptors()));
+        }
+        return interceptors;
+    }
+
 }

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
Fri Feb  3 21:33:07 2012
@@ -289,6 +289,8 @@ public class EffectivePolicyImplTest ext
         
         control.reset();
         setupPolicyInterceptorProviderRegistry(engine, reg);
+        EasyMock.expect(reg.getOutInterceptorsForAssertion(null))
+            .andReturn(new ArrayList<Interceptor<? extends Message>>());
         PolicyAssertion a = control.createMock(PolicyAssertion.class);        
         alternative.add(a);
         control.replay();
@@ -300,7 +302,8 @@ public class EffectivePolicyImplTest ext
         setupPolicyInterceptorProviderRegistry(engine, reg);
         QName qn = new QName("http://x.y.z", "a");
         EasyMock.expect(a.getName()).andReturn(qn);
-        EasyMock.expect(reg.get(qn)).andReturn(null);
+        EasyMock.expect(reg.getOutInterceptorsForAssertion(qn))
+            .andReturn(new ArrayList<Interceptor<? extends Message>>());
         control.replay();
         epi.initialiseInterceptors(engine);
         assertEquals(0, epi.getInterceptors().size());
@@ -309,12 +312,10 @@ public class EffectivePolicyImplTest ext
         control.reset();
         setupPolicyInterceptorProviderRegistry(engine, reg);
         EasyMock.expect(a.getName()).andReturn(qn);        
-        PolicyInterceptorProvider pp = control.createMock(PolicyInterceptorProvider.class);
              
-        EasyMock.expect(reg.get(qn)).andReturn(pp);
         Interceptor<Message> pi = control.createMock(Interceptor.class);
         List<Interceptor<? extends Message>> m = new ArrayList<Interceptor<?
extends Message>>();
         m.add(pi);
-        EasyMock.expect(pp.getOutInterceptors()).andReturn(m);
+        EasyMock.expect(reg.getOutInterceptorsForAssertion(qn)).andReturn(m);
         control.replay();
         epi.initialiseInterceptors(engine);
         assertEquals(1, epi.getInterceptors().size());

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java
Fri Feb  3 21:33:07 2012
@@ -41,7 +41,6 @@ import org.apache.neethi.Policy;
 import org.apache.neethi.PolicyOperator;
 import org.easymock.EasyMock;
 import org.easymock.IMocksControl;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -52,21 +51,23 @@ import org.junit.Test;
 public class EndpointPolicyImplTest extends Assert {
 
     private IMocksControl control;
+
     final class TestEndpointPolicy extends EndpointPolicyImpl {
         @Override
         protected EndpointPolicyImpl createEndpointPolicy() {
             return new TestEndpointPolicy();
         }
-        @Override 
+
+        @Override
         void finalizeConfig() {
         }
     };
-    
+
     @Before
     public void setUp() {
         control = EasyMock.createNiceControl();
-    } 
-    
+    }
+
     @SuppressWarnings("unchecked")
     private List<Interceptor<? extends Message>> createMockInterceptorList()
{
         Interceptor<? extends Message> i = control.createMock(Interceptor.class);
@@ -83,7 +84,7 @@ public class EndpointPolicyImplTest exte
         assertNull(epi.getChosenAlternative());
         assertNull(epi.getInterceptors());
         assertNull(epi.getFaultInterceptors());
-        
+
         Policy p = control.createMock(Policy.class);
         Assertion a = control.createMock(Assertion.class);
         List<Assertion> la = Collections.singletonList(a);
@@ -103,36 +104,31 @@ public class EndpointPolicyImplTest exte
         assertSame(la, epi.getFaultVocabulary());
         control.verify();
     }
-    
+
     @Test
     public void testInitialize() throws NoSuchMethodException {
-        Method m1 = EndpointPolicyImpl.class.getDeclaredMethod("initializePolicy",
-            new Class[] {});
-        Method m2 = EndpointPolicyImpl.class.getDeclaredMethod("checkExactlyOnes",
-            new Class[] {});
-        Method m3 = EndpointPolicyImpl.class.getDeclaredMethod("chooseAlternative",
-            new Class[] {});
-        Method m4 = EndpointPolicyImpl.class.getDeclaredMethod("initializeVocabulary",
-            new Class[] {});
-        Method m5 = EndpointPolicyImpl.class.getDeclaredMethod("initializeInterceptors",
-            new Class[] {});
+        Method m1 = EndpointPolicyImpl.class.getDeclaredMethod("initializePolicy", new Class[]
{});
+        Method m2 = EndpointPolicyImpl.class.getDeclaredMethod("checkExactlyOnes", new Class[]
{});
+        Method m3 = EndpointPolicyImpl.class.getDeclaredMethod("chooseAlternative", new Class[]
{});
+        Method m4 = EndpointPolicyImpl.class.getDeclaredMethod("initializeVocabulary", new
Class[] {});
+        Method m5 = EndpointPolicyImpl.class.getDeclaredMethod("initializeInterceptors",
new Class[] {});
         EndpointPolicyImpl epi = EasyMock.createMockBuilder(EndpointPolicyImpl.class)
             .addMockedMethods(m1, m2, m3, m4, m5).createMock(control);
-         
+
         epi.initializePolicy();
         EasyMock.expectLastCall();
         epi.checkExactlyOnes();
         EasyMock.expectLastCall();
         epi.chooseAlternative();
         EasyMock.expectLastCall();
-        
+
         control.replay();
         epi.initialize();
-        control.verify();        
+        control.verify();
     }
-    
+
     @Test
-    public void testInitializePolicy() {        
+    public void testInitializePolicy() {
         EndpointInfo ei = control.createMock(EndpointInfo.class);
         PolicyEngineImpl engine = control.createMock(PolicyEngineImpl.class);
         ServiceInfo si = control.createMock(ServiceInfo.class);
@@ -144,82 +140,79 @@ public class EndpointPolicyImplTest exte
         Policy merged = control.createMock(Policy.class);
         EasyMock.expect(sp.merge(ep)).andReturn(merged);
         EasyMock.expect(merged.normalize(null, true)).andReturn(merged);
-        
+
         control.replay();
         EndpointPolicyImpl epi = new EndpointPolicyImpl(ei, engine, true, null);
         epi.initializePolicy();
         assertSame(merged, epi.getPolicy());
         control.verify();
     }
-       
+
     @Test
     public void testChooseAlternative() {
         Policy policy = new Policy();
-        
+
         PolicyEngineImpl engine = control.createMock(PolicyEngineImpl.class);
         Assertor assertor = control.createMock(Assertor.class);
         AlternativeSelector selector = control.createMock(AlternativeSelector.class);
-        
+
         EndpointPolicyImpl epi = new EndpointPolicyImpl(null, engine, true, assertor);
-        epi.setPolicy(policy);        
-        
+        epi.setPolicy(policy);
+
         EasyMock.expect(engine.getAlternativeSelector()).andReturn(selector);
         EasyMock.expect(selector.selectAlternative(policy, engine, assertor, null)).andReturn(null);
-        
+
         control.replay();
         try {
-            epi.chooseAlternative();  
+            epi.chooseAlternative();
             fail("Expected PolicyException not thrown.");
         } catch (PolicyException ex) {
             // expected
         }
         control.verify();
-        
-        control.reset();        
+
+        control.reset();
         EasyMock.expect(engine.getAlternativeSelector()).andReturn(selector);
         Collection<Assertion> alternative = new ArrayList<Assertion>();
         EasyMock.expect(selector.selectAlternative(policy, engine, assertor, null)).andReturn(alternative);
-        control.replay();        
+        control.replay();
         epi.chooseAlternative();
         Collection<Assertion> choice = epi.getChosenAlternative();
-        assertSame(choice, alternative);   
+        assertSame(choice, alternative);
         control.verify();
     }
-    
 
     @Test
     public void testUpdatePolicy() {
-        
+
         EndpointPolicyImpl epi = new TestEndpointPolicy();
-        
+
         Policy p1 = new Policy();
         QName aqn1 = new QName("http://x.y.z", "a");
         p1.addAssertion(mockAssertion(aqn1, 5, true));
-        
+
         Policy p2 = new Policy();
         QName aqn2 = new QName("http://x.y.z", "b");
         p2.addAssertion(mockAssertion(aqn2, 5, true));
         control.replay();
-        
+
         epi.setPolicy(p1.normalize(null, true));
-                
+
         Policy ep = epi.updatePolicy(p2).getPolicy();
-        
-        List<ExactlyOne> pops = 
-            CastUtils.cast(ep.getPolicyComponents(), ExactlyOne.class);
+
+        List<ExactlyOne> pops = CastUtils.cast(ep.getPolicyComponents(), ExactlyOne.class);
         assertEquals("New policy must have 1 top level policy operator", 1, pops.size());
-        List<All> alts = 
-            CastUtils.cast(pops.get(0).getPolicyComponents(), All.class);
+        List<All> alts = CastUtils.cast(pops.get(0).getPolicyComponents(), All.class);
         assertEquals("2 alternatives should be available", 2, alts.size());
-        
-        List<PolicyAssertion> assertions1 = 
-            CastUtils.cast(alts.get(0).getAssertions(), PolicyAssertion.class);
+
+        List<PolicyAssertion> assertions1 = CastUtils
+            .cast(alts.get(0).getAssertions(), PolicyAssertion.class);
         assertEquals("1 assertion should be available", 1, assertions1.size());
-            
-        List<PolicyAssertion> assertions2 = 
-                CastUtils.cast(alts.get(1).getAssertions(), PolicyAssertion.class);
-        assertEquals("1 assertion should be available", 1, assertions2.size());    
-        
+
+        List<PolicyAssertion> assertions2 = CastUtils
+            .cast(alts.get(1).getAssertions(), PolicyAssertion.class);
+        assertEquals("1 assertion should be available", 1, assertions2.size());
+
         QName n1 = assertions1.get(0).getName();
         QName n2 = assertions2.get(0).getName();
         assertTrue("Policy was not merged",
@@ -228,22 +221,22 @@ public class EndpointPolicyImplTest exte
 
     @Test
     public void testUpdatePolicyWithEmptyPolicy() {
-        
+
         doTestUpdateWithEmptyPolicy(new Policy());
     }
-    
+
     @Test
     public void testUpdatePolicyWithEmptyAll() {
-        
+
         Policy emptyPolicy = new Policy();
         emptyPolicy.addPolicyComponent(new All());
         emptyPolicy.addPolicyComponent(new All());
         doTestUpdateWithEmptyPolicy(emptyPolicy);
     }
-    
+
     @Test
     public void testUpdatePolicyWithEmptyExactlyOneAndAll() {
-        
+
         Policy emptyPolicy = new Policy();
         PolicyOperator exactlyOne = new ExactlyOne();
         exactlyOne.addPolicyComponent(new All());
@@ -252,37 +245,35 @@ public class EndpointPolicyImplTest exte
         emptyPolicy.addPolicyComponent(new All());
         emptyPolicy.addPolicyComponent(new All());
         doTestUpdateWithEmptyPolicy(emptyPolicy);
-    }    
-    
+    }
+
     private void doTestUpdateWithEmptyPolicy(Policy emptyPolicy) {
         Policy p1 = new Policy();
         QName aqn1 = new QName("http://x.y.z", "a");
         p1.addAssertion(mockAssertion(aqn1, 5, true));
-        
+
         EndpointPolicyImpl epi = new TestEndpointPolicy();
         control.replay();
-        
+
         epi.setPolicy(p1.normalize(true));
-                
+
         Policy ep = epi.updatePolicy(emptyPolicy).getPolicy();
-        
-        List<ExactlyOne> pops = 
-            CastUtils.cast(ep.getPolicyComponents(), ExactlyOne.class);
+
+        List<ExactlyOne> pops = CastUtils.cast(ep.getPolicyComponents(), ExactlyOne.class);
         assertEquals("New policy must have 1 top level policy operator", 1, pops.size());
-        List<All> alts = 
-            CastUtils.cast(pops.get(0).getPolicyComponents(), All.class);
+        List<All> alts = CastUtils.cast(pops.get(0).getPolicyComponents(), All.class);
         assertEquals("1 alternatives should be available", 1, alts.size());
-        
-        List<PolicyAssertion> assertions1 = 
-            CastUtils.cast(alts.get(0).getAssertions(), PolicyAssertion.class);
+
+        List<PolicyAssertion> assertions1 = CastUtils
+            .cast(alts.get(0).getAssertions(), PolicyAssertion.class);
         assertEquals("1 assertion should be available", 1, assertions1.size());
-        
+
         QName n1 = assertions1.get(0).getName();
         assertTrue("Policy was not merged", n1.equals(aqn1));
     }
-    
+
     private PolicyAssertion mockAssertion(QName name, int howMany, boolean normalize) {
-        PolicyAssertion a = control.createMock(PolicyAssertion.class);        
+        PolicyAssertion a = control.createMock(PolicyAssertion.class);
         EasyMock.expect(a.getName()).andReturn(name).times(howMany);
         if (normalize) {
             EasyMock.expect(a.getType()).andReturn(Constants.TYPE_ASSERTION).times(howMany);
@@ -290,23 +281,23 @@ public class EndpointPolicyImplTest exte
         }
         return a;
     }
-    
+
     @Test
     public void testInitialiseInterceptorsServer() {
         doTestInitializeInterceptors(false);
     }
-    
+
     @Test
     public void testInitialiseInterceptorsClient() {
         doTestInitializeInterceptors(true);
     }
-    
+
     private void doTestInitializeInterceptors(boolean requestor) {
-        
+
         EndpointInfo ei = control.createMock(EndpointInfo.class);
         PolicyEngineImpl engine = control.createMock(PolicyEngineImpl.class);
-        
-        EndpointPolicyImpl epi = new EndpointPolicyImpl(ei, engine, requestor, null);   
    
+
+        EndpointPolicyImpl epi = new EndpointPolicyImpl(ei, engine, requestor, null);
         Collection<Assertion> v = new ArrayList<Assertion>();
         Collection<Assertion> fv = new ArrayList<Assertion>();
         QName aqn = new QName("http://x.y.z", "a");
@@ -316,21 +307,17 @@ public class EndpointPolicyImplTest exte
         epi.setVocabulary(v);
         epi.setChosenAlternative(v);
         epi.setFaultVocabulary(fv);
-        
+
         PolicyInterceptorProviderRegistry reg = control.createMock(PolicyInterceptorProviderRegistry.class);
         setupPolicyInterceptorProviderRegistry(engine, reg);
-        
-        PolicyInterceptorProvider app = control.createMock(PolicyInterceptorProvider.class);
              
-        EasyMock.expect(reg.get(aqn)).andReturn(app).anyTimes();
+
         List<Interceptor<? extends Message>> li = createMockInterceptorList();
         Interceptor<? extends Message> api = li.get(0);
-        EasyMock.expect(app.getInInterceptors())
-            .andReturn(li).anyTimes();
+        EasyMock.expect(reg.getInInterceptorsForAssertion(aqn)).andReturn(li).anyTimes();
         if (requestor) {
-            EasyMock.expect(app.getInFaultInterceptors())
-                .andReturn(li).anyTimes();
+            EasyMock.expect(reg.getInFaultInterceptorsForAssertion(aqn)).andReturn(li).anyTimes();
         }
-        
+
         control.replay();
         epi.initializeInterceptors();
         assertEquals(1, epi.getInterceptors().size());
@@ -341,16 +328,14 @@ public class EndpointPolicyImplTest exte
         } else {
             assertNull(epi.getFaultInterceptors());
         }
-        control.verify();          
+        control.verify();
     }
-    
-    private void setupPolicyInterceptorProviderRegistry(PolicyEngineImpl engine, 
+
+    private void setupPolicyInterceptorProviderRegistry(PolicyEngineImpl engine,
                                                         PolicyInterceptorProviderRegistry
reg) {
-        Bus bus = control.createMock(Bus.class);        
+        Bus bus = control.createMock(Bus.class);
         EasyMock.expect(engine.getBus()).andReturn(bus).anyTimes();
-        EasyMock.expect(bus.getExtension(PolicyInterceptorProviderRegistry.class))
-            .andReturn(reg).anyTimes();
+        EasyMock.expect(bus.getExtension(PolicyInterceptorProviderRegistry.class)).andReturn(reg).anyTimes();
     }
-    
-  
+
 }

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/IgnorablePolicyInterceptorProviderTest.java
Fri Feb  3 21:33:07 2012
@@ -21,6 +21,7 @@ package org.apache.cxf.ws.policy;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Set;
 
 import javax.xml.namespace.QName;
 
@@ -40,32 +41,35 @@ import org.junit.Test;
 
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-
 /**
  * 
  */
 public class IgnorablePolicyInterceptorProviderTest extends Assert {
     private static final QName ONEWAY_QNAME = new QName("http://tempuri.org/policy", "OneWay");
     private static final QName DUPLEX_QNAME = new QName("http://tempuri.org/policy", "Duplex");
-        
+
     @Test
     public void testProvider() {
         Bus bus = null;
         try {
             bus = new SpringBusFactory().createBus("/org/apache/cxf/ws/policy/ignorable-policy.xml",
false);
-            
-            PolicyInterceptorProviderRegistry pipreg = 
-                bus.getExtension(PolicyInterceptorProviderRegistry.class);
-            
+
+            PolicyInterceptorProviderRegistry pipreg = bus
+                .getExtension(PolicyInterceptorProviderRegistry.class);
+
             assertNotNull(pipreg);
-            
-            PolicyInterceptorProvider pip = pipreg.get(ONEWAY_QNAME);
-            
-            assertNotNull(pip);
-            
-            PolicyInterceptorProvider pip2 = pipreg.get(DUPLEX_QNAME);
-            
-            assertEquals(pip, pip2);
+
+            Set<PolicyInterceptorProvider> pips = pipreg.get(ONEWAY_QNAME);
+
+            assertNotNull(pips);
+            assertFalse(pips.isEmpty());
+
+            Set<PolicyInterceptorProvider> pips2 = pipreg.get(DUPLEX_QNAME);
+
+            assertNotNull(pips2);
+            assertFalse(pips2.isEmpty());
+
+            assertEquals(pips.iterator().next(), pips2.iterator().next());
 
         } finally {
             if (null != bus) {
@@ -80,26 +84,29 @@ public class IgnorablePolicyInterceptorP
         Bus bus = null;
         try {
             bus = new SpringBusFactory().createBus("/org/apache/cxf/ws/policy/ignorable-policy.xml",
false);
-            
-            PolicyInterceptorProviderRegistry pipreg = 
-                bus.getExtension(PolicyInterceptorProviderRegistry.class);
-            
+
+            PolicyInterceptorProviderRegistry pipreg = bus
+                .getExtension(PolicyInterceptorProviderRegistry.class);
+
             assertNotNull(pipreg);
-            
-            PolicyInterceptorProvider pip = pipreg.get(ONEWAY_QNAME);
-            
-            assertNotNull(pip);
-            
+
+            Set<PolicyInterceptorProvider> pips = pipreg.get(ONEWAY_QNAME);
+
+            assertNotNull(pips);
+            assertFalse(pips.isEmpty());
+
+            PolicyInterceptorProvider pip = pips.iterator().next();
+
             List<Interceptor<Message>> list;
             list = CastUtils.cast(pip.getOutInterceptors());
             verifyAssertion(list);
-            
+
             list = CastUtils.cast(pip.getInInterceptors());
             verifyAssertion(list);
 
             list = CastUtils.cast(pip.getOutFaultInterceptors());
             verifyAssertion(list);
-            
+
             list = CastUtils.cast(pip.getInFaultInterceptors());
             verifyAssertion(list);
 
@@ -110,8 +117,7 @@ public class IgnorablePolicyInterceptorP
             }
         }
     }
-    
-    
+
     private void verifyAssertion(List<Interceptor<Message>> list) {
         Message message = new MessageImpl();
         AssertionInfoMap aim = createTestAssertions();
@@ -125,7 +131,7 @@ public class IgnorablePolicyInterceptorP
         for (Interceptor<Message> p : list) {
             p.handleMessage(message);
         }
-            
+
         aim.check();
     }
 
@@ -138,25 +144,29 @@ public class IgnorablePolicyInterceptorP
             context = new ClassPathXmlApplicationContext("/org/apache/cxf/ws/policy/ignorable-policy2.xml");
             cxf1 = (Bus)context.getBean("cxf1");
             assertNotNull(cxf1);
-            
+
             cxf2 = (Bus)context.getBean("cxf2");
             assertNotNull(cxf2);
-            
-            PolicyInterceptorProviderRegistry pipreg1 = 
-                cxf1.getExtension(PolicyInterceptorProviderRegistry.class);
+
+            PolicyInterceptorProviderRegistry pipreg1 = cxf1
+                .getExtension(PolicyInterceptorProviderRegistry.class);
             assertNotNull(pipreg1);
 
-            PolicyInterceptorProviderRegistry pipreg2 = 
-                cxf2.getExtension(PolicyInterceptorProviderRegistry.class);
+            PolicyInterceptorProviderRegistry pipreg2 = cxf2
+                .getExtension(PolicyInterceptorProviderRegistry.class);
             assertNotNull(pipreg2);
 
-            PolicyInterceptorProvider pip1 = pipreg1.get(ONEWAY_QNAME);
-            
-            assertNotNull(pip1);
-            
-            PolicyInterceptorProvider pip2 = pipreg2.get(ONEWAY_QNAME);
-            
-            assertEquals(pip1, pip2);
+            Set<PolicyInterceptorProvider> pips1 = pipreg1.get(ONEWAY_QNAME);
+
+            assertNotNull(pips1);
+            assertFalse(pips1.isEmpty());
+
+            Set<PolicyInterceptorProvider> pips2 = pipreg2.get(ONEWAY_QNAME);
+
+            assertNotNull(pips2);
+            assertFalse(pips2.isEmpty());
+
+            assertEquals(pips1.iterator().next(), pips2.iterator().next());
 
         } finally {
             if (null != cxf1) {
@@ -166,9 +176,8 @@ public class IgnorablePolicyInterceptorP
         }
     }
 
-
     private AssertionInfoMap createTestAssertions() {
-        AssertionInfoMap aim = new AssertionInfoMap(CastUtils.cast(Collections.EMPTY_LIST,

+        AssertionInfoMap aim = new AssertionInfoMap(CastUtils.cast(Collections.EMPTY_LIST,
                                                                    PolicyAssertion.class));
         Assertion a = new PrimitiveAssertion(ONEWAY_QNAME);
         Assertion b = new PrimitiveAssertion(DUPLEX_QNAME);
@@ -178,7 +187,7 @@ public class IgnorablePolicyInterceptorP
 
         aim.put(ONEWAY_QNAME, Collections.singleton(ai));
         aim.put(DUPLEX_QNAME, Collections.singleton(bi));
-        
+
         return aim;
     }
 }

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java
Fri Feb  3 21:33:07 2012
@@ -20,6 +20,7 @@
 package org.apache.cxf.ws.policy;
 
 import java.util.Collection;
+import java.util.Set;
 
 import javax.xml.namespace.QName;
 
@@ -67,10 +68,12 @@ public class PolicyExtensionsTest extend
             PolicyInterceptorProviderRegistry pipr = bus
                 .getExtension(PolicyInterceptorProviderRegistry.class);
             assertNotNull(pipr);
-            PolicyInterceptorProvider pip = pipr.get(KNOWN);
-            assertNotNull(pip);
-            pip = pipr.get(UNKNOWN);
-            assertNull(pip);
+            Set<PolicyInterceptorProvider> pips = pipr.get(KNOWN);
+            assertNotNull(pips);
+            assertFalse(pips.isEmpty());
+            pips = pipr.get(UNKNOWN);
+            assertNotNull(pips);
+            assertTrue(pips.isEmpty());
             
             DomainExpressionBuilderRegistry debr = bus.getExtension(DomainExpressionBuilderRegistry.class);
             assertNotNull(debr);

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
Fri Feb  3 21:33:07 2012
@@ -19,7 +19,18 @@
 
 package org.apache.cxf.ws.policy;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Message;
+import org.easymock.EasyMock;
+import org.easymock.IMocksControl;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -27,10 +38,71 @@ import org.junit.Test;
  */
 public class PolicyInterceptorProviderRegistryImplTest extends Assert {
 
+    private static final QName ASSERTION = new QName("testns", "test");
+    private static final QName WRONG_ASSERTION = new QName("testns", "wrong");
+    private IMocksControl control;
+
+    @Before
+    public void setUp() {
+        control = EasyMock.createNiceControl();
+        new Integer(4);
+    }
+
     @Test
     public void testConstructors() {
         PolicyInterceptorProviderRegistryImpl reg = new PolicyInterceptorProviderRegistryImpl();
         assertNotNull(reg);
         assertEquals(PolicyInterceptorProviderRegistry.class, reg.getRegistrationType());
     }
+
+    @Test
+    @SuppressWarnings("unchecked")
+    public void testRegister() {
+        PolicyInterceptorProviderRegistryImpl reg = new PolicyInterceptorProviderRegistryImpl();
+        PolicyInterceptorProvider pp = control.createMock(PolicyInterceptorProvider.class);
+        Interceptor<Message> pi1 = control.createMock(Interceptor.class);
+        Interceptor<Message> pi2 = control.createMock(Interceptor.class);
+        Interceptor<Message> pif = control.createMock(Interceptor.class);
+        Interceptor<Message> po = control.createMock(Interceptor.class);
+        Interceptor<Message> pof = control.createMock(Interceptor.class);
+        List<Interceptor<? extends Message>> pil = new ArrayList<Interceptor<?
extends Message>>();
+        pil.add(pi1);
+        pil.add(pi2);
+        List<Interceptor<? extends Message>> pifl = new ArrayList<Interceptor<?
extends Message>>();
+        pifl.add(pif);
+        List<Interceptor<? extends Message>> pol = new ArrayList<Interceptor<?
extends Message>>();
+        pol.add(po);
+        List<Interceptor<? extends Message>> pofl = new ArrayList<Interceptor<?
extends Message>>();
+        pofl.add(pof);
+        EasyMock.expect(pp.getInInterceptors()).andReturn(pil);
+        EasyMock.expect(pp.getInFaultInterceptors()).andReturn(pifl);
+        EasyMock.expect(pp.getOutInterceptors()).andReturn(pol);
+        EasyMock.expect(pp.getOutFaultInterceptors()).andReturn(pofl);
+        Collection<QName> assertionTypes = new ArrayList<QName>();
+        assertionTypes.add(ASSERTION);
+        EasyMock.expect(pp.getAssertionTypes()).andReturn(assertionTypes);
+        control.replay();
+        reg.register(pp);
+        assertEquals(pil, reg.getInInterceptorsForAssertion(ASSERTION));
+        assertEquals(pifl, reg.getInFaultInterceptorsForAssertion(ASSERTION));
+        assertEquals(pol, reg.getOutInterceptorsForAssertion(ASSERTION));
+        assertEquals(pofl, reg.getOutFaultInterceptorsForAssertion(ASSERTION));
+        assertTrue(reg.getInInterceptorsForAssertion(WRONG_ASSERTION).isEmpty());
+        control.verify();
+    }
+
+    @Test
+    public void testGetNotNull() {
+        PolicyInterceptorProviderRegistryImpl reg = new PolicyInterceptorProviderRegistryImpl();
+        assertNotNull(reg.get(ASSERTION));
+        assertTrue(reg.get(ASSERTION).isEmpty());
+        assertNotNull(reg.getInInterceptorsForAssertion(ASSERTION));
+        assertTrue(reg.getInInterceptorsForAssertion(ASSERTION).isEmpty());
+        assertNotNull(reg.getOutInterceptorsForAssertion(ASSERTION));
+        assertTrue(reg.getOutInterceptorsForAssertion(ASSERTION).isEmpty());
+        assertNotNull(reg.getInFaultInterceptorsForAssertion(ASSERTION));
+        assertTrue(reg.getInFaultInterceptorsForAssertion(ASSERTION).isEmpty());
+        assertNotNull(reg.getOutFaultInterceptorsForAssertion(ASSERTION));
+        assertTrue(reg.getOutFaultInterceptorsForAssertion(ASSERTION).isEmpty());
+    }
 }

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java Fri Feb  3 21:33:07
2012
@@ -672,7 +672,8 @@ public class RMEndpoint {
         EffectivePolicyImpl(EndpointPolicy ep, PolicyInterceptorProviderRegistry reg, boolean
outbound,
                             boolean fault) {
             endpointPolicy = ep;
-            interceptors = reg.getInterceptors(endpointPolicy.getChosenAlternative(), outbound,
fault);
+            interceptors = reg.getInterceptorsForAlternative(endpointPolicy.getChosenAlternative(),
+                                                             outbound, fault);
         }
 
         public Collection<Assertion> getChosenAlternative() {

Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java?rev=1240348&r1=1240347&r2=1240348&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java (original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java Fri Feb  3 21:33:07
2012
@@ -352,7 +352,7 @@ public class RMEndpointTest extends Asse
         EasyMock.expect(ep.getChosenAlternative()).andReturn(alt).times(2);
         PolicyInterceptorProviderRegistry reg = control.createMock(PolicyInterceptorProviderRegistry.class);
         List<Interceptor<? extends Message>> li = new ArrayList<Interceptor<?
extends Message>>();
-        EasyMock.expect(reg.getInterceptors(alt, true, false)).andReturn(li);
+        EasyMock.expect(reg.getInterceptorsForAlternative(alt, true, false)).andReturn(li);
         Policy p = control.createMock(Policy.class);
         EasyMock.expect(ep.getPolicy()).andReturn(p);
         control.replay();



Mime
View raw message