BindingDOMDataTreeProducerAdapter extends AbstractBindingAdapter<DOMDataTreeProducer> implements DataTreeProducer { @Override public CursorAwareWriteTransaction createTransaction(final boolean isolated) { final DOMDataTreeCursorAwareTransaction domTx = getDelegate().createTransaction(isolated); return new BindingDOMCursorAwareWriteTransactionAdapter<>(adapterContext(), domTx); } BindingDOMDataTreeProducerAdapter(final AdapterContext adapterContext, final DOMDataTreeProducer delegate); @Override CursorAwareWriteTransaction createTransaction(final boolean isolated); @Override DataTreeProducer createProducer(final Collection<DataTreeIdentifier<?>> subtrees); @Override void close();  }
@Test public void createTransactionTest() { doReturn(mock(DOMDataTreeCursorAwareTransaction.class)).when(delegate).createTransaction(true); assertNotNull(bindingDOMDataTreeProducerAdapter.createTransaction(true)); verify(delegate).createTransaction(true); }