BindingDOMDataTreeProducerAdapter extends AbstractBindingAdapter<DOMDataTreeProducer> implements DataTreeProducer { @Override public DataTreeProducer createProducer(final Collection<DataTreeIdentifier<?>> subtrees) { final Collection<DOMDataTreeIdentifier> domSubtrees = currentSerializer().toDOMDataTreeIdentifiers(subtrees); final DOMDataTreeProducer domChildProducer = getDelegate().createProducer(domSubtrees); return new BindingDOMDataTreeProducerAdapter(adapterContext(), domChildProducer); } 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 createProducerTest() { doReturn(mock(DOMDataTreeProducer.class)).when(delegate).createProducer(any()); assertNotNull(bindingDOMDataTreeProducerAdapter.createProducer(ImmutableSet.of())); verify(delegate).createProducer(any()); }