I have written a test method for creation of Flux
object.
Test Method:
@Test
public void testCreateFlux() {
Flux<String> fruitFlux = Flux
.just("A", "B", "C", "D");
StepVerifier.create(fruitFlux)
.expectNext("A")
.expectNext("B")
.expectNext("C")
.expectNext("D")
.verifyComplete();
}
My question is there any way I can simplify my test method without using multiple expectNext()
statements.