class TransactionChainProxy extends AbstractTransactionContextFactory<LocalTransactionChain> implements DOMStoreTransactionChain {

    @Override
    public DOMStoreWriteTransaction newWriteOnlyTransaction() {
        getActorUtils().acquireTxCreationPermit();
        return allocateWriteTransaction(TransactionType.WRITE_ONLY);
    }

}

class TransactionChainProxyTest extends AbstractTransactionContextFactory<LocalTransactionChain> {

    private LocalHistoryIdentifier historyId;

    @SuppressWarnings("resource")
    @Test
    public void testNewWriteOnlyTransaction() {

        DOMStoreTransaction dst = new TransactionChainProxy(mockComponentFactory, historyId).newWriteOnlyTransaction();
        Assert.assertTrue(dst instanceof DOMStoreWriteTransaction);

    }

}