Minor: extract several assert methods
Minor: do configuration in one place
'Configure as Kotlin (java) modules' doesn't work properly if several modules depends on KotlinJavaRuntime

 #KT-5595 Fixed