### Question:
ShardCleaner { @VisibleForTesting void abortOldTransactions() { dao.abortOldTransactions(maxTimestamp(maxTransactionAge)); } @Inject  ShardCleaner(
            DaoSupplier<ShardDao> shardDaoSupplier,
            Ticker ticker,
            NodeManager nodeManager,
            StorageService storageService,
            Optional<BackupStore> backupStore,
            ShardCleanerConfig config);  ShardCleaner(
            DaoSupplier<ShardDao> shardDaoSupplier,
            String currentNode,
            boolean coordinator,
            Ticker ticker,
            StorageService storageService,
            Optional<BackupStore> backupStore,
            Duration maxTransactionAge,
            Duration transactionCleanerInterval,
            Duration localCleanerInterval,
            Duration localCleanTime,
            Duration backupCleanerInterval,
            Duration backupCleanTime,
            int backupDeletionThreads,
            Duration maxCompletedTransactionAge); @PostConstruct void start(); @PreDestroy void shutdown(); @Managed @Nested CounterStat getTransactionJobErrors(); @Managed @Nested CounterStat getBackupJobErrors(); @Managed @Nested CounterStat getLocalJobErrors(); @Managed @Nested CounterStat getBackupShardsQueued(); @Managed @Nested CounterStat getBackupShardsCleaned(); @Managed @Nested CounterStat getLocalShardsCleaned(); @Managed void startBackupCleanup(); @Managed void startLocalCleanup(); @Managed void startLocalCleanupImmediately();  }### Answer:
@Test public void testAbortOldTransactions() { TestingDao dao = dbi.onDemand(TestingDao.class); long now = System.currentTimeMillis(); long txn1 = dao.insertTransaction(new Timestamp(now - HOURS.toMillis(26))); long txn2 = dao.insertTransaction(new Timestamp(now - HOURS.toMillis(25))); long txn3 = dao.insertTransaction(new Timestamp(now)); ShardDao shardDao = dbi.onDemand(ShardDao.class); assertEquals(shardDao.finalizeTransaction(txn1, true), 1); assertQuery("SELECT transaction_id, successful FROM transactions", row(txn1, true), row(txn2, null), row(txn3, null)); cleaner.abortOldTransactions(); assertQuery("SELECT transaction_id, successful FROM transactions", row(txn1, true), row(txn2, false), row(txn3, null)); }