DistributedDataStore extends AbstractDataStore { @Override public DOMStoreReadWriteTransaction newReadWriteTransaction() { getActorUtils().acquireTxCreationPermit(); return new TransactionProxy(txContextFactory, TransactionType.READ_WRITE); } DistributedDataStore(final ActorSystem actorSystem, final ClusterWrapper cluster,
            final Configuration configuration, final DatastoreContextFactory datastoreContextFactory,
            final DatastoreSnapshot restoreFromSnapshot); @VisibleForTesting  DistributedDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier); @Override DOMStoreTransactionChain createTransactionChain(); @Override DOMStoreReadTransaction newReadOnlyTransaction(); @Override DOMStoreWriteTransaction newWriteOnlyTransaction(); @Override DOMStoreReadWriteTransaction newReadWriteTransaction(); @Override void close();  }
@Test public void testRateLimitingUsedInReadWriteTxCreation() { try (DistributedDataStore distributedDataStore = new DistributedDataStore(actorUtils, UNKNOWN_ID)) { distributedDataStore.newReadWriteTransaction(); verify(actorUtils, times(1)).acquireTxCreationPermit(); } }