To test CompletableFuture.runAsync() method, one can use Awaitility library.
The traditional approach of using Thread.sleep(...) to wait for asynchronous processing is inefficient.
By adding the Awaitility library as a dependency, test assertions can be wrapped with the await method.
The Awaitility library repeatedly evaluates the assertions until they are successful, ensuring completion of asynchronous processing before verification.