Good point Gary; simply setting the flag inside the loop won't work. Having it throw `InterruptedException` and letting that bubble up the stack to the unit test is also a reasonable approach.