title: Parameterized Test in Kotlin usign mehtod source for nested test class
body: <p>I may use case the class under test has many cases so it is divided into a structure of inner classes. I want to write parameterized test cases to reduce boiler plate and code duplication.
  For this I wanted to go with the approach of method source.
  Class under test</p>
  <pre><code>class UnderTest
  {
      testThisMethod(a:String,b:String?){
          // Do something
          externalInterface.call(a?:b) 
      }
  }
  </code></pre>
  <p>Test Case structure</p>
  <pre><code>internal class A() {
      private val externalService = mockk&lt;ExternalService&gt;
      private val test: UnderTest(externalService)
  
      // Some general tests
      //---Position Outter
      inner class A {
          //--- Position A
          inner class B {
              //--- Position C
              @ParameterizedTest
              @MethodSource(&quot;provideArguments&quot;)
              fun `with arguments external service create object`(
                  argument1: String,
                  argument2: String,
                  expected: String
              ) {
                  // Some code
                  verify {
                      externalService.call(expected)
                      //some more verification
                  }
              }
          }
      }
  }
  </code></pre>
  <p>To provide the argument provider method I tried placing it at positions and got following errors</p>
  <ul>
  <li>Position outer: initialization error :Could not find factory method in class</li>
  <li>Position A,B: compilation error: companion not allowed here</li>
  </ul>
  <p>How can this be achieved?</p>