title: Use pure Kotlin function as Junit5 methodsource
body: <p>I am curious if in the Kotlin, in the parameterized tests in Junit5, i can use the method outside the class as the @MethodSource.</p>
  
  <p>I know about 2 ways to use @MethodSource in Kotlin - companion object and @TestInstance(TestInstance.Lifecycle.PER_CLASS). I wonder if it can be done in a different way, for example by declaring a method outside the class and using some annotation? I tried to do it this way, but it does not work, I wonder if something similar can be done.</p>
  
  <pre class="lang-java prettyprint-override"><code>class GenerationStatusTest {
  
      @ParameterizedTest
      @MethodSource("provideStatusesToTest")
      internal fun shouldStatusesHaveExpectedAbilities(generationStatus: GenerationStatus, assertions:(GenerationStatus)-&gt;Unit) {
          assertions(generationStatus)
      }
  }
  
  fun provideStatusesToTest(): Stream&lt;Arguments&gt; {
      return Stream.of(
              Arguments.of(WAITING, canDoNothing),
              Arguments.of(PROCESSING, canDoNothing)
      )
  }
  </code></pre>
  
  <pre><code>org.junit.platform.commons.JUnitException: Could not find factory method [provideStatusesToTest] in class [com.test.enums.GenerationStatusTest]
      at org.junit.jupiter.params.provider.MethodArgumentsProvider.lambda$getMethod$4(MethodArgumentsProvider.java:83)
  </code></pre>