@Override protected void testDecodeError(Publisher<DataBuffer> input, ResolvableType outputType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) { input = Flux.concat( Flux.from(input).take(1), Flux.error(new InputException())); Flux<Resource> result = this.decoder.decode(input, outputType, mimeType, hints); StepVerifier.create(result) .expectError(InputException.class) .verify(); }