@Test
void shouldDropTooOldChannelsWhenMaxLifetimeEnabled()
{

    int maxLifetime = 1000;
    PoolSettings settings = new PoolSettings( DEFAULT_MAX_CONNECTION_POOL_SIZE,
            DEFAULT_CONNECTION_ACQUISITION_TIMEOUT, maxLifetime, DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST );
    Clock clock = Clock.SYSTEM;
    NettyChannelHealthChecker healthChecker = newHealthChecker( settings, clock );
    setCreationTimestamp( channel, clock.millis() - maxLifetime * 2 );
    Future<Boolean> healthy = healthChecker.isHealthy( channel );
    assertThat( await( healthy ), is( false ) );
}