title: Dynamically changing @MethodSource in abstract class from a @ParameterizedTest (Jupiter-Junit 5)
body: <p>I am currently writing unit tests related to GET requests, here below is a parameterized test that take a generic type E.</p>
  <pre><code>abstract class AbstractEntityTest&lt; E extends Entity &gt; {
  
  @ParameterizedTest( name = &quot;[{index}]: {2}&quot; )
  @MethodSource( &quot;RoleDataProvider#provideIntArgsToTest&quot; )
  void testIntRequestsThatReturnSingle( String fileName, Integer requestParam, String testName, int index )
           // do something
      }
  }
  </code></pre>
  <p>What I want to do is to dynamically change the method source in function of the actual type of E at runtime.</p>
  <p>Example:</p>
  <pre><code>public class AnimalTest extends AbstractEntityTest&lt; Animal &gt; {
  ... }
  </code></pre>
  <p>Here E is type Animal so I would like to change the @MethodSource to</p>
  <pre><code>@MethodSource( &quot;AnimalDataProvider#provideIntArgsToTest&quot; )
  </code></pre>
  <p>Is there any way to do it ? I've been searching for hours to no avail...</p>