@Test
public void updateBranchTransactionDO() throws SQLException {

    BranchTransactionDO branchTransactionDO = new BranchTransactionDO();
    branchTransactionDO.setResourceId("qqqq");
    branchTransactionDO.setXid("abc-123:8888");
    branchTransactionDO.setTransactionId(1285343);
    branchTransactionDO.setBranchId(343434318);
    branchTransactionDO.setBranchType("TCC");
    branchTransactionDO.setResourceGroupId("abc");
    branchTransactionDO.setLockKey("t:1,2,3;t2,4,5,6");
    branchTransactionDO.setResourceGroupId("a");
    branchTransactionDO.setClientId("1.1.1.1");
    branchTransactionDO.setStatus(1);
    branchTransactionDO.setApplicationData("abc=123");
    branchTransactionDO.setResourceGroupId("test");
    boolean ret = logStoreDataBaseDAO.insertBranchTransactionDO(branchTransactionDO);
    Assertions.assertTrue(ret);
    branchTransactionDO.setStatus(3);
    Assertions.assertTrue(logStoreDataBaseDAO.updateBranchTransactionDO(branchTransactionDO));
    String sql = "select * from branch_table where xid= 'abc-123:8888' and branch_id = 343434318";
    String delSql = "delete from branch_table where xid= 'abc-123:8888' and branch_id = 343434318";
    Connection conn = null;
    try{
        conn = dataSource.getConnection();
        ResultSet rs = conn.createStatement().executeQuery(sql);
        if(rs.next()){
            Assertions.assertTrue(true);
            Assertions.assertEquals(3, rs.getInt("status"));
        }else {
            Assertions.assertTrue(false);
        }
        conn.createStatement().execute(delSql);
    }finally {
        if(conn != null){
            conn.close();
        }
    }
}