Obviously I need the correct import statment to solve this problem. According to the docs for AndroidJUnit4, this should be
import android.support.test.runn
Add this dependency in your build.gradle file:
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
Update the end version (1.1.1) with the latest version released.
1.1.1