BindingDOMTransactionChainAdapter implements TransactionChain, Delegator<DOMTransactionChain> { @Override public WriteTransaction newWriteOnlyTransaction() { final DOMDataTreeWriteTransaction delegateTx = createTransaction(delegate::newWriteOnlyTransaction); return new BindingDOMWriteTransactionAdapter<>(adapterContext, delegateTx) { @Override public FluentFuture<? extends CommitInfo> commit() { return listenForFailure(this, super.commit()); } }; } BindingDOMTransactionChainAdapter(final Function<DOMTransactionChainListener, DOMTransactionChain> chainFactory,
            final AdapterContext codec, final TransactionChainListener listener); @Override DOMTransactionChain getDelegate(); @Override ReadTransaction newReadOnlyTransaction(); @Override WriteTransaction newWriteOnlyTransaction(); @Override ReadWriteTransaction newReadWriteTransaction(); @Override void close();  }
@Test public void writeTransactionTest() throws Exception { doReturn(mock(DOMDataTreeWriteTransaction.class)).when(transactionChain).newWriteOnlyTransaction(); assertNotNull(bindingDOMTransactionChainAdapter.newWriteOnlyTransaction()); }