MockControl sessionControl = MockControl.createControl(SqlMapSession.class);
final SqlMapSession session = (SqlMapSession) sessionControl.getMock();
MockControl clientControl = MockControl.createControl(SqlMapClient.class);
SqlMapClient client = (SqlMapClient) clientControl.getMock();
client.openSession();
clientControl.setReturnValue(session, 1);
session.getCurrentConnection();
sessionControl.setReturnValue(null, 1);
session.setUserConnection(con);
sessionControl.setVoidCallable(1);