Object value = factory.getBean("broker");
assertTrue("Should have created a broker!", value != null);
assertTrue("Should be a broker container: " + value, value instanceof BrokerContainer);
BrokerContainer container = (BrokerContainer) value;
Broker broker = container.getBroker();
assertTrue("Should have a broker!", broker != null);
assertEquals("Broker name not set!", "localhost", broker.getBrokerName());
Object transport = factory.getBean("transport");
assertTrue("Made transport", transport != null);
List connectors = container.getTransportConnectors();
assertEquals("Should have created more connectors", 3, connectors.size());
BrokerConnectorImpl connector1 = (BrokerConnectorImpl) connectors.get(0);
TransportServerChannel serverChannel1 = connector1.getServerChannel();
assertTrue(serverChannel1 instanceof VmTransportServerChannel);
BrokerConnectorImpl connector2 = (BrokerConnectorImpl) connectors.get(1);
TransportServerChannel serverChannel2 = connector2.getServerChannel();
assertTrue(serverChannel2 instanceof TcpTransportServerChannel);
TcpTransportServerChannel tcpChannel2 = (TcpTransportServerChannel) serverChannel2;
assertEquals("backlog", 1000, tcpChannel2.getBacklog());
assertEquals("maxOutstandingMessages", 50, tcpChannel2.getMaxOutstandingMessages());
assertTrue("useAsyncSend", tcpChannel2.isUseAsyncSend());
assertTrue("Created correct wireFormat: " + tcpChannel2.getWireFormat(), tcpChannel2.getWireFormat() instanceof WireFormatStub);
List networkConnectors = container.getNetworkConnectors();
assertEquals("Should have a single network connector", 1, networkConnectors.size());
NetworkConnector networkConnector = (NetworkConnector) networkConnectors.get(0);
List networkChannels = networkConnector.getNetworkChannels();
assertEquals("Should have 2 network channels", 2, networkChannels.size());