Use `awaitForCondition`test utils method instead of `Thread.sleep`
Use
awaitForConditiontest utils method instead ofThread.sleep