As discussed previously, the verify operator is used to assert the configured behavior. The termination event for a publisher must be validated before the verify call. Alternatively, Reactor provides convenient verify methods to validate the termination event and assert the complete configured chain. Similar to expectError, the API is offered in the following methods:

Method name Description
 verifyComplete() This method only validates the occurrence of a completion event.
verifyError() This method only validates the occurrence of an error event.
verifyError(exceptionClass) This method  validates an error event and matches an underlying exception class wrapped in the error event.
verifyError(exceptionMsg) This method validates ...

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.