@Test
public void test_addGlobalSession() throws TransactionException, SQLException {

    GlobalSession session = GlobalSession.createGlobalSession("test",
            "test", "test123", 100);
    String xid = XID.generateXID(session.getTransactionId());
    session.setXid(xid);
    session.setTransactionId(146757978);
    session.setBeginTime(System.currentTimeMillis());
    session.setApplicationData("abc=878s");
    session.setStatus(GlobalStatus.Begin);
    sessionManager.addGlobalSession(session);
    String sql = "select * from global_table where xid= '"+xid+"'";
    String delSql = "delete from global_table where xid= '"+xid+"'";
    Connection conn = null;
    try{
        conn = dataSource.getConnection();
        ResultSet rs = conn.createStatement().executeQuery(sql);
        if(rs.next()){
            Assertions.assertTrue(true);
        }else{
            Assertions.assertTrue(false);
        }
        conn.createStatement().execute(delSql);
    }finally {
        if(conn != null){
            conn.close();
        }
    }
}