### Question:
NMRBindingFactory extends AbstractBindingFactory { public Binding createBinding(BindingInfo binding) { NMRBinding jb = new NMRBinding((NMRBindingInfo) binding); jb.getInInterceptors().add(new StaxInInterceptor()); jb.getInInterceptors().add(new NMROperationInInterceptor()); jb.getInInterceptors().add(new NMRWrapperInInterceptor()); jb.getOutInterceptors().add(new StaxOutInterceptor()); jb.getOutInterceptors().add(new NMRWrapperOutInterceptor()); jb.getOutFaultInterceptors().add(new StaxOutInterceptor()); jb.getOutFaultInterceptors().add(new NMRFaultOutInterceptor()); jb.getInFaultInterceptors().add(new NMRFaultInInterceptor()); return jb; }  Binding createBinding(BindingInfo binding); BindingInfo createBindingInfo(ServiceInfo service, String namespace, Object config);  }### Answer:
@Test public void testCreateBinding() { NMRBindingInfo info = new NMRBindingInfo(new ServiceInfo(), "id"); Binding binding = new NMRBindingFactory().createBinding(info); assertEquals(3, binding.getInInterceptors().size()); assertEquals(2, binding.getOutInterceptors().size()); assertEquals(2, binding.getOutFaultInterceptors().size()); assertEquals(NMROperationInInterceptor.class.getName(), binding.getInInterceptors().get(1).getClass().getName()); assertEquals(NMRWrapperInInterceptor.class.getName(), binding.getInInterceptors().get(2).getClass().getName()); assertEquals(StaxOutInterceptor.class.getName(), binding.getOutInterceptors().get(0).getClass().getName()); assertEquals(NMRWrapperOutInterceptor.class.getName(), binding.getOutInterceptors().get(1).getClass().getName()); assertEquals(StaxOutInterceptor.class.getName(), binding.getOutFaultInterceptors().get(0).getClass().getName()); assertEquals(NMRFaultOutInterceptor.class.getName(), binding.getOutFaultInterceptors().get(1).getClass().getName()); }