InmemoryDOMDataTreeShardWriteTransaction implements DOMDataTreeShardWriteTransaction, Identifiable<String> { @Override public ListenableFuture<Void> prepare() { LOG.debug("PreCommit on open transaction on shard {}", modification.getPrefix()); return executor.submit(new ShardPreCommitCoordinationTask(modification.getPrefix(), cohorts)); } InmemoryDOMDataTreeShardWriteTransaction(final InMemoryDOMDataTreeShardProducer producer,
                                             final ShardDataModification root,
                                             final DataTree rootShardDataTree,
                                             final InMemoryDOMDataTreeShardChangePublisher changePublisher,
                                             final ListeningExecutorService executor); @Override String getIdentifier(); @Override void close(); boolean isFinished(); @Override void ready(); @Override ListenableFuture<Void> submit(); @Override ListenableFuture<Boolean> validate(); @Override ListenableFuture<Void> prepare(); @Override ListenableFuture<Void> commit(); @Override DOMDataTreeWriteCursor createCursor(final DOMDataTreeIdentifier prefix);  }
@Test public void prepare() throws Exception { inmemoryDOMDataTreeShardWriteTransaction.ready(); assertNull(inmemoryDOMDataTreeShardWriteTransaction.prepare().get()); verify(DATA_TREE).prepare(any()); }