I was trying to avoid Thread.sleep in tests.