public XPlannerTestSupport() throws Exception {
hibernateSessionFactory = new MockSessionFactory();
GlobalSessionFactory.set(hibernateSessionFactory);
hibernateSession = new MockSession();
hibernateSessionFactory.openSessionReturn = hibernateSession;
connection = new MockConnection();
hibernateSession.connectionReturn = connection;
mockPreparedStatement = new MockPreparedStatement();
connection.prepareStatementReturn = mockPreparedStatement;
mockResultSet = new MockResultSet();
mockPreparedStatement.executeQueryReturn = mockResultSet;