Before now, we have tested final outcomes for each Reactive Stream as the complete pipeline was created in the test case. This approach is not a good unit test as it does not validate the components in isolation. In Reactor, pipelines are declared in code. These pipelines are then lazily instantiated and verified. Since a complete pipeline is instantiated, it is quite difficult to unit test components in isolation. For unit testing, we must have the ability to stub the components of a pipeline, leaving behind the component being tested. But in this case, how can we validate an existing pipeline for the sequence of operations? Reactor provides the StepVerifier component to validate the required operations in isolation. This API ...

Get Hands-On Reactive Programming with Reactor now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.