@Test
public void testInvokeFunction() throws Exception {

    neow3j.invokeFunction(
            "af7c7328eee5a275a3bcaee2bf0cf662b5e739be",
            "balanceOf",
            Arrays.asList(
                    ContractParameter.hash160(new ScriptHash("91b83e96f2a7c4fdf0c1688441ec61986c7cae26"))
            ),
            new Signer.Builder()
                    .account(new ScriptHash("0xcadb3dc2faa3ef14a13b619c9a43124755aa2569"))
                    .scopes(WitnessScope.CALLED_BY_ENTRY)
                    .build()
    ).send();
    verifyResult(
            "{\"jsonrpc\":\"2.0\",\"method\":\"invokefunction\","
                    + "\"params\":[\"af7c7328eee5a275a3bcaee2bf0cf662b5e739be\","
                    + "\"balanceOf\","
                    + "["
                    + "{\"type\":\"Hash160\",\"value\":\"91b83e96f2a7c4fdf0c1688441ec61986c7cae26\"}"
                    + "],"
                    + "[{\"account\":\"cadb3dc2faa3ef14a13b619c9a43124755aa2569\",\"scopes\":[\"CalledByEntry\"],"
                    + "\"allowedcontracts\":[],\"allowedgroups\":[]}]"
                    + "],\"id\":1}"
    );
}