MockControl resultCtrl = MockControl.createControl(QueryResult.class);
QueryResult result = (QueryResult) resultCtrl.getMock();
sessionControl.expectAndReturn(session.getWorkspace(), ws);
wsCtrl.expectAndReturn(ws.getQueryManager(), qm);
qmCtrl.expectAndReturn(qm.createQuery(stmt1, language), query);
qmCtrl.expectAndReturn(qm.createQuery(stmt2, language), query);
queryCtrl.expectAndReturn(query.execute(), result);
queryCtrl.expectAndReturn(query.execute(), result);
sfControl.replay();