### Question:
KernelTransactions extends LifecycleAdapter implements Supplier<KernelTransactionsSnapshot> { public void blockNewTransactions() { doBlockNewTransactions(); } KernelTransactions( Config config, StatementLocksFactory statementLocksFactory, ConstraintIndexCreator constraintIndexCreator,
            StatementOperationParts statementOperations, SchemaWriteGuard schemaWriteGuard, TransactionHeaderInformationFactory txHeaderFactory,
            TransactionCommitProcess transactionCommitProcess, AuxiliaryTransactionStateManager auxTxStateManager, TransactionHooks hooks,
            TransactionMonitor transactionMonitor, AvailabilityGuard databaseAvailabilityGuard, Tracers tracers, StorageEngine storageEngine,
            Procedures procedures, TransactionIdStore transactionIdStore, SystemNanoClock clock, AtomicReference<CpuClock> cpuClockRef,
            AtomicReference<HeapAllocation> heapAllocationRef, AccessCapability accessCapability, AutoIndexing autoIndexing,
            ExplicitIndexStore explicitIndexStore, VersionContextSupplier versionContextSupplier, CollectionsFactorySupplier collectionsFactorySupplier,
            ConstraintSemantics constraintSemantics, SchemaState schemaState, IndexingService indexingService, TokenHolders tokenHolders,
            String currentDatabaseName, Dependencies dataSourceDependencies ); KernelTransaction newInstance( KernelTransaction.Type type, LoginContext loginContext, long timeout ); Set<KernelTransactionHandle> activeTransactions(); void disposeAll(); void terminateTransactions(); boolean haveClosingTransaction(); @Override void start(); @Override void stop(); @Override void shutdown(); @Override KernelTransactionsSnapshot get(); void blockNewTransactions(); void unblockNewTransactions();  }### Answer:
@Test( timeout = TEST_TIMEOUT ) public void blockNewTransactions() throws Throwable { KernelTransactions kernelTransactions = newKernelTransactions(); kernelTransactions.blockNewTransactions(); Future<KernelTransaction> txOpener = t2.execute( state -> kernelTransactions.newInstance( explicit, AnonymousContext.write(), 0L ) ); t2.get().waitUntilWaiting( location -> location.isAt( KernelTransactions.class, "newInstance" ) ); assertNotDone( txOpener ); kernelTransactions.unblockNewTransactions(); assertNotNull( txOpener.get() ); }