Run assertions with an argument

    When using a capturing slot, testing the FileNetwork.download function looks like this:

    withArg can be helpful when you use arguments that aren’t easily compared, such as a data class containing arrays. The function on an array works differently than on a List. Arrays are only equal if you compare with the exact same instance, while lists are equal if all of their items are equal. Since Kotlin data classes use the equals() function with each property, this array behaviour affects them.

    is also provided by MockK when you wish to use it with a nullable argument.