### Question:
CorbaBindingFactory extends AbstractWSDLBindingFactory implements ConduitInitiator, DestinationFactory { public Binding createBinding(BindingInfo bindingInfo) { CorbaBinding binding = new CorbaBinding(); binding.getInFaultInterceptors().add(new CorbaStreamFaultInInterceptor()); binding.getOutFaultInterceptors().add(new CorbaStreamFaultOutInterceptor()); binding.getOutInterceptors().add(new BareOutInterceptor()); binding.getOutInterceptors().add(new CorbaStreamOutInterceptor()); binding.getInInterceptors().add(new BareInInterceptor()); binding.getInInterceptors().add(new CorbaStreamInInterceptor()); binding.setBindingInfo(bindingInfo); return binding; } CorbaBindingFactory(); void setOrbClass(String cls); void setOrbSingletonClass(String cls); Binding createBinding(BindingInfo bindingInfo); Conduit getConduit(EndpointInfo endpointInfo, Bus bus); Conduit getConduit(EndpointInfo endpointInfo, EndpointReferenceType target, Bus bus); Destination getDestination(EndpointInfo endpointInfo, Bus bus); List<String> getTransportIds(); void setTransportIds(List<String> ids); void setOrbArgs(List<String> args); Set<String> getUriPrefixes(); OrbConfig getOrbConfig(); void setOrbConfig(OrbConfig config); static final Collection<String> DEFAULT_NAMESPACES; }### Answer:
@Test public void testCreateBinding() throws Exception { IMocksControl control = EasyMock.createNiceControl(); BindingInfo bindingInfo = control.createMock(BindingInfo.class); CorbaBinding binding = (CorbaBinding)factory.createBinding(bindingInfo); assertNotNull(binding); assertTrue(CorbaBinding.class.isInstance(binding)); List<Interceptor<? extends Message>> inInterceptors = binding.getInInterceptors(); assertNotNull(inInterceptors); List<Interceptor<? extends Message>> outInterceptors = binding.getOutInterceptors(); assertNotNull(outInterceptors); assertEquals(2, inInterceptors.size()); assertEquals(2, outInterceptors.size()); }