title: Limit infinite stream of arguments in parameterized test
body: <p>I want to write a ParameterizedTest that facilitates a MethodSource to generate a sequence of random values. Now I'm wondering, if there is any <em>declarative</em> approach to limit the number of tests run.</p>
  
  <pre class="lang-java prettyprint-override"><code>@ParameterizedTest
  @MethodSource("create64RandomBytes")
  //@SomeLimitAnnotation(100) wanted here
  void testStuff(byte[] randomBytes) {
      // ...
  }
  
  static Stream&lt;Arguments&gt; create64RandomBytes() {
      Random rnd = new Random(42l);
      return Stream.generate(() -&gt; {
          byte[] bytes = new byte[64];
          rnd.nextBytes(bytes);
          return Arguments.of(bytes);
      }).limit(100); // I want to avoid this "limit" call
  }
  </code></pre>
  
  <p>Of course I can limit the number of items in the stream, but since <code>@MethodSource</code> is built for consuming streams (and surely the JUnit devs are aware of infinite streams), I wonder if there is a better way of doing this.</p>
  
  <p>TLDR: Can I replace the <code>limit(100)</code> call with an annotation on my test method?</p>