### Question:
PolicyInterceptorProviderRegistryImpl extends RegistryImpl<QName, Set<PolicyInterceptorProvider>> implements PolicyInterceptorProviderRegistry, BusExtension { public void register(PolicyInterceptorProvider provider) { for (QName qn : provider.getAssertionTypes()) { Set<PolicyInterceptorProvider> providers = super.get(qn); if (providers == null) { providers = new CopyOnWriteArraySet<>(); } providers.add(provider); super.register(qn, providers); } } PolicyInterceptorProviderRegistryImpl();  PolicyInterceptorProviderRegistryImpl(Bus b);  PolicyInterceptorProviderRegistryImpl(Map<QName, Set<PolicyInterceptorProvider>> interceptors); @Resource final void setBus(Bus b); void register(PolicyInterceptorProvider provider); Class<?> getRegistrationType(); @Override Set<PolicyInterceptorProvider> get(QName qn); List<Interceptor<? extends Message>> getInterceptorsForAlternative(Collection<? extends Assertion> alternative,
                                  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);  }### Answer:
@Test 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<>(); pil.add(pi1); pil.add(pi2); List<Interceptor<? extends Message>> pifl = new ArrayList<>(); pifl.add(pif); List<Interceptor<? extends Message>> pol = new ArrayList<>(); pol.add(po); List<Interceptor<? extends Message>> pofl = new ArrayList<>(); 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<>(); 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(); }