rme.shutdown();
}
@Test
public void testEffectivePolicyImpl() {
EndpointPolicy ep = control.createMock(EndpointPolicy.class);
Collection<PolicyAssertion> alt = new ArrayList<PolicyAssertion>();
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);
Policy p = control.createMock(Policy.class);
EasyMock.expect(ep.getPolicy()).andReturn(p);
control.replay();
EffectivePolicy effective = rme.new EffectivePolicyImpl(ep, reg, true, false);
assertSame(alt, effective.getChosenAlternative());
assertSame(li, effective.getInterceptors());
assertSame(p, effective.getPolicy());