MockControl cfControl = MockControl.createControl(ConnectionFactory.class);
ConnectionFactory cf = (ConnectionFactory) cfControl.getMock();
MockControl conControl = MockControl.createControl(Connection.class);
Connection con = (Connection) conControl.getMock();
ExceptionListener listener = new ChainedExceptionListener();
cf.createConnection();
cfControl.setReturnValue(con, 1);
con.setExceptionListener(listener);
conControl.setVoidCallable(1);
con.getExceptionListener();