@Test
public void resultHandlerUsesGivenObjectReader() throws IOException {

    // given
    ObjectReader mockedObjectReader = mock(ObjectReader.class);
    HCHttp factory = new HCHttp(createDefaultHttpObjectFactoryBuilder()) {
        @Override
        protected ObjectReader configuredReader() {
            return mockedObjectReader;
        }
    };
    ResponseHandler<BatchResult> resultHandler = factory.createResultHandler(
            BatchRequestTest.createDefaultTestObjectBuilder().build(),
            batchRequest -> true
    );
    InputStream inputStream = mock(InputStream.class);
    // when
    resultHandler.deserializeResponse(inputStream);
    // then
    verify(mockedObjectReader).readValue(any(InputStream.class));
}