### Question:
KernelTransactionMonitor implements Runnable { @Override public synchronized void run() { long nowNanos = clock.nanos(); Set<KernelTransactionHandle> activeTransactions = kernelTransactions.activeTransactions(); checkExpiredTransactions( activeTransactions, nowNanos ); } KernelTransactionMonitor( KernelTransactions kernelTransactions, SystemNanoClock clock, LogService logService ); @Override synchronized void run();  }### Answer:
@Test void shouldNotTimeoutSchemaTransactions() { KernelTransactions kernelTransactions = mock( KernelTransactions.class ); FakeClock clock = new FakeClock( 100, MINUTES ); KernelTransactionMonitor monitor = new KernelTransactionMonitor( kernelTransactions, clock, NullLogService.getInstance() ); KernelTransactionHandle oldSchemaTransaction = mock( KernelTransactionHandle.class ); when( oldSchemaTransaction.isSchemaTransaction() ).thenReturn( true ); when( oldSchemaTransaction.startTime() ).thenReturn( clock.millis() - MINUTES.toMillis( 2 ) ); when( oldSchemaTransaction.timeoutMillis() ).thenReturn( MINUTES.toMillis( 1 ) ); when( kernelTransactions.activeTransactions() ).thenReturn( Iterators.asSet( oldSchemaTransaction ) ); monitor.run(); verify( oldSchemaTransaction, times( 1 ) ).isSchemaTransaction(); verify( oldSchemaTransaction, never() ).markForTermination( any() ); }