@Test
public void txn_threaded_02() {

    //Transactional tx = DatasetGraphFactory.createTxnMem();
    Transactional tx = counter; 
    
    // Start and enter the W transaction.
    ThreadAction a = ThreadTxn.threadTxnWrite(tx, ()->{});
    // ThreadAction started ... in W transaction.
    Txn.exec(tx, TxnType.READ_PROMOTE, ()->{
        // ... have the thread action complete.
        a.run(); 
        // Blocks promotion.
        boolean b = tx.promote();
        assertFalse(b);
        assertEquals(ReadWrite.READ, tx.transactionMode());
    });
}