Awaitility is a small Java DSL for synchronizing asynchronous operations
https://github.com/awaitility/awaitility
这个工具很容易的实现将异步操作同步化,在自动化测试的时候很方便,如:
await().atMost(10, SECONDS).until(map::isEmpty);