SnapshotTransactionManager extends AbstractLockAwareTransactionManager { @Override public void registerClosingCallback(Runnable closingCallback) { Preconditions.checkNotNull(closingCallback, "Cannot register a null callback."); closingCallbacks.add(closingCallback); } protected  SnapshotTransactionManager(
            MetricsManager metricsManager,
            KeyValueService keyValueService,
            TimelockService timelockService,
            LockWatchManager lockWatchManager,
            LockWatchEventCache lockWatchEventCache,
            TimestampManagementService timestampManagementService,
            LockService lockService,
            @NotNull TransactionService transactionService,
            Supplier<AtlasDbConstraintCheckingMode> constraintModeSupplier,
            ConflictDetectionManager conflictDetectionManager,
            SweepStrategyManager sweepStrategyManager,
            Cleaner cleaner,
            boolean allowHiddenTableAccess,
            int concurrentGetRangesThreadPoolSize,
            int defaultGetRangesConcurrency,
            TimestampCache timestampCache,
            MultiTableSweepQueueWriter sweepQueueWriter,
            ExecutorService deleteExecutor,
            boolean validateLocksOnReads,
            Supplier<TransactionConfig> transactionConfig,
            ConflictTracer conflictTracer,
            MetricsFilterEvaluationContext metricsFilterEvaluationContext); @Override T runTaskWithConditionThrowOnConflict(
            C condition, ConditionAwareTransactionTask<T, C, E> task); @Override List<OpenTransaction> startTransactions(List<? extends PreCommitCondition> conditions); @Override T runTaskWithConditionReadOnly(
            C condition, ConditionAwareTransactionTask<T, C, E> task); @Override void registerClosingCallback(Runnable closingCallback); @Override void close(); @Override void clearTimestampCache(); @Override LockService getLockService(); @Override TimelockService getTimelockService(); @Override LockWatchManager getLockWatchManager(); @Override long getImmutableTimestamp(); @Override long getUnreadableTimestamp(); @Override Cleaner getCleaner(); @Override KeyValueService getKeyValueService(); @Override TimestampService getTimestampService(); @Override TimestampManagementService getTimestampManagementService(); @Override TransactionService getTransactionService(); @Override KeyValueServiceStatus getKeyValueServiceStatus();  }
@Test public void cannotRegisterNullCallback() { assertThatThrownBy(() -> snapshotTransactionManager.registerClosingCallback(null)) .isInstanceOf(NullPointerException.class); }