@Override
    public String sendCall(String to, String data, DefaultBlockParameter defaultBlockParameter)
            throws IOException {
        EthCall ethCall =
                web3j.ethCall(
                                Transaction.createEthCallTransaction(getFromAddress(), to, data),
                                defaultBlockParameter)
                        .send();

        assertCallNotReverted(ethCall);

        return ethCall.getValue() != null
                ? ethCall.getValue()
                : ethCall.getError() != null ? ethCall.getError().getData() : null;
    }
@Test
    void sendCallErrorRevertByDataNull() throws IOException {
        EthCall lookupDataHex = new EthCall();
        Response.Error error = new Response.Error();
        error.setCode(3);
        error.setData(null);
        lookupDataHex.setError(error);

        Request request = mock(Request.class);
        when(request.send()).thenReturn(lookupDataHex);
        when(web3j.ethCall(any(Transaction.class), any(DefaultBlockParameter.class)))
                .thenReturn(request);

        assertThrows(
                ContractCallException.class,
                () ->
                        clientTransactionManager.sendCall(
                                "0xAdress", "data", DefaultBlockParameter.valueOf("latest")));
    }