### Question:
SampleFlux extends AbstractParametrizedFlux { @Nonnull public SampleFlux withN(final int n) { withPropertyValue("n", n); return this; } SampleFlux(@Nonnull final Flux source); @Nonnull SampleFlux withN(final int n); @Nonnull SampleFlux withPos(final int pos);  }### Answer:
@Test void sampleWith() { Flux flux = Flux .from("telegraf") .sample() .withN(5); Assertions.assertThat(flux.toString()).isEqualToIgnoringWhitespace("from(bucket:\"telegraf\") |> sample(n: 5)"); }