public void putConnect(String url, String username, String password, String dbType, String database,
        Long dataSourceId, Long consoleId) {
        ConnectInfo connectInfo = new ConnectInfo();
        connectInfo.setUser(username);
        connectInfo.setConsoleId(consoleId);
        connectInfo.setDataSourceId(dataSourceId);
        connectInfo.setPassword(password);
        connectInfo.setDbType(dbType);
        connectInfo.setUrl(url);
        connectInfo.setDatabase(database);
        connectInfo.setConsoleOwn(false);
        Chat2DBContext.putContext(connectInfo);
    }
Basic test class

@author Jiaju Zhuang
chat2db-server/chat2db-server-test/src/test/java/ai/chat2db/server/test/common/BaseTest.java