Using Thread.sleep in a test is just generally a bad idea.
It creates brittle tests that can fail unpredictably depending on environment ("Passes on my machine!") or load.
@Test
public void testDoTheThing(){
MyClass myClass = new MyClass();
myClass.doTheThing();
Thread.sleep(500); // Noncompliant
// assertions...
}