private static void stressTest(final Handler<Tweet> handler,
final long chunkSize) throws JSONException, TweetParseException, HandlerException {
while (true) {
long before = new Date().getTime();
for (long i = 0; i < chunkSize; i++) {
Tweet t = randomTweet();
if (!handler.isOpen()) {
return;
}
handler.handle(t);
}