assertTrue(phs3 == handlers.get(9));
assertTrue(sh1 == handlers.get(10));
}
public void testConfigureSystemHandlers() {
IMocksControl control = EasyMock.createControl();
TestBinding b = new TestBinding();
SystemHandlerChainType shc = null;
Configuration c = control.createMock(Configuration.class);
expect(c.getObject("systemHandlerChain")).andReturn(shc);
control.replay();
b.configureSystemHandlers(c);
assertEquals(0, b.getPreLogicalSystemHandlers().size());
assertEquals(0, b.getPostLogicalSystemHandlers().size());
assertEquals(0, b.getPreProtocolSystemHandlers().size());
assertEquals(0, b.getPreProtocolSystemHandlers().size());
control.verify();
control.reset();
shc = new ObjectFactory().createSystemHandlerChainType();
c = control.createMock(Configuration.class);
expect(c.getObject("systemHandlerChain")).andReturn(shc);
control.replay();
b.configureSystemHandlers(c);
assertEquals(0, b.getPreLogicalSystemHandlers().size());
assertEquals(0, b.getPostLogicalSystemHandlers().size());
assertEquals(0, b.getPreProtocolSystemHandlers().size());
assertEquals(0, b.getPreProtocolSystemHandlers().size());
control.verify();
control.reset();
shc = createSystemHandlerChain();
c = control.createMock(Configuration.class);
expect(c.getObject("systemHandlerChain")).andReturn(shc);
control.replay();
b.configureSystemHandlers(c);
assertEquals(2, b.getPreLogicalSystemHandlers().size());
assertEquals(1, b.getPostLogicalSystemHandlers().size());
assertEquals(1, b.getPreProtocolSystemHandlers().size());
assertEquals(2, b.getPostProtocolSystemHandlers().size());
control.verify();
}