@Test
public void setMaxBlockSize_producesCorrectTransaction() throws Throwable {

    setUpWireMockForCall("invokescript", "policy_setMaxBlockSize.json");
    setUpWireMockForCall("getblockcount", "getblockcount_1000.json");
    byte[] expectedScript = new ScriptBuilder()
            .contractCall(POLICY_SCRIPT_HASH, "setMaxBlockSize",
                    Arrays.asList(ContractParameter.integer(200000)))
            .toArray();
    Wallet w = Wallet.withAccounts(account1);
    Transaction tx = new PolicyContract(neow3j)
            .setMaxBlockSize(200000)
            .wallet(w)
            .signers(Signer.calledByEntry(account1.getScriptHash()))
            .sign();
    assertThat(tx.getSigners(), hasSize(1));
    assertThat(tx.getSigners().get(0).getScriptHash(), is(account1.getScriptHash()));
    assertThat(tx.getSigners().get(0).getScopes(), contains(WitnessScope.CALLED_BY_ENTRY));
    assertThat(tx.getScript(), is(expectedScript));
    assertThat(tx.getWitnesses(), hasSize(1));
    assertThat(tx.getWitnesses().get(0).getVerificationScript().getScript(),
            is(account1.getVerificationScript().getScript()));
}