@VisibleForTesting
    public static boolean isTtlEnough(ConfidenceBasedTtlInfo ttlInfo, Duration estimatedExecutionTime)
    {
        Instant expiryTime = ttlInfo.getExpiryInstant();
        long timeRemainingInSeconds = SECONDS.between(Instant.now(), expiryTime);
        return new Duration(Math.max(timeRemainingInSeconds, 0), TimeUnit.SECONDS).compareTo(estimatedExecutionTime) >= 0;
    }
@Test
    public void testTtlComparison()
    {
        ConfidenceBasedTtlInfo confidenceBasedTtlInfo = ConfidenceBasedTtlInfo.getInfiniteTtl();
        Duration estimatedExecutionTime = new Duration(1, TimeUnit.HOURS);
        assertTrue(SimpleTtlNodeSelector.isTtlEnough(confidenceBasedTtlInfo, estimatedExecutionTime));
    }