public Flowable<EthBlock> replayBlocksFlowable(
            DefaultBlockParameter startBlock,
            DefaultBlockParameter endBlock,
            boolean fullTransactionObjects) {
        return replayBlocksFlowable(startBlock, endBlock, fullTransactionObjects, true);
    }
@Test
    void testReplayBlocksFlowableWhenIOExceptionOnBlockResolving() throws IOException {
        Web3j web3j = mock(Web3j.class, RETURNS_DEEP_STUBS);
        when(web3j.ethGetBlockByNumber(any(), anyBoolean()).send())
                .thenThrow(new IOException("fail"));

        JsonRpc2_0Rx rpc = new JsonRpc2_0Rx(web3j, Executors.newSingleThreadScheduledExecutor());

        Flowable<EthBlock> flowable =
                rpc.replayBlocksFlowable(
                        mock(DefaultBlockParameter.class),
                        mock(DefaultBlockParameter.class),
                        false,
                        false);
        EthBlock expected = mock(EthBlock.class);
        EthBlock actual = flowable.onErrorReturnItem(expected).blockingFirst();

        assertSame(expected, actual, "unexpected returned block");
    }