private boolean verifyFinalServerListCount(int finalCount, DynamicServerListLoadBalancer lb) throws Exception {
        long stepSize = TimeUnit.MILLISECONDS.convert(50l, TimeUnit.MILLISECONDS);
        long maxTime = TimeUnit.MILLISECONDS.convert(2l, TimeUnit.SECONDS);

        for (int i = 0; i < maxTime; i += stepSize) {
            if (finalCount == lb.getServerCount(false)) {
                return true;
            } else {
                Thread.sleep(stepSize);
            }
        }

        return false;
    }
A test for {@link com.netflix.loadbalancer.DynamicServerListLoadBalancer} using the
{@link com.netflix.niws.loadbalancer.EurekaNotificationServerListUpdater} instead of the default.

@author David Liu
ribbon-eureka/src/test/java/com/netflix/loadbalancer/EurekaDynamicServerListLoadBalancerTest.java