Dependending on you execution context the test might fail. Make sure the `populateFiles` method returns a `Seq` of `Future` (using `map` instead of `foreach`). Then you can use `Future.sequence` to return that into an `Future` of `Seq` which can be awaited.

After that you can check the result.