Sampler sampler = null;
int loops = 0;
long now = System.currentTimeMillis();
while ((sampler = controller.next()) != null) {
loops++;
sampler.sample(null);
}
long elapsed = System.currentTimeMillis() - now;
assertTrue("Should be at least 20 loops", loops >= 20);
assertTrue("Should be fewer than 30 loops", loops < 30);
assertTrue("Should take at least 10 seconds", elapsed >= 10000);