### Question:
BlockingResponseHandler implements ResponseHandler<T> { @Override public T deserializeResponse(InputStream inputStream) throws IOException { return objectReader.readValue(inputStream); } BlockingResponseHandler(ObjectReader objectReader, Function<Exception, T> errorResponseTemplate); @Override final void completed(T result); @Override final void failed(Exception exception); @Override T deserializeResponse(InputStream inputStream); T getResult();  }### Answer:
@Test public void deserializesResponseUsinGivenReader() throws IOException { ObjectReader mockedObjectReader = mock(ObjectReader.class); BlockingResponseHandler<Response> handler = new BlockingResponseHandler<>( mockedObjectReader, ex -> null); InputStream inputStream = mock(InputStream.class); handler.deserializeResponse(inputStream); verify(mockedObjectReader).readValue(any(InputStream.class)); }