@Test
public void voteProducesCorrectScriptAnsSigner() throws IOException {

    setUpWireMockForCall("invokescript", "invokescript_vote.json");
    setUpWireMockForCall("getblockcount", "getblockcount_1000.json");
    byte[] pubKeyBytes1 = Numeric.hexStringToByteArray(
            "02200284598c6c1117f163dd938a4c8014cf2cf1164c4b7197f347109db50eae7c");
    byte[] pubKeyBytes2 = Numeric.hexStringToByteArray(
            "02c0b60c995bc092e866f15a37c176bb59b7ebacf069ba94c0ebf561cb8f956238");
    byte[] expectedScript = new ScriptBuilder().contractCall(NEO_TOKEN_SCRIPT_HASH, VOTE,
            Arrays.asList(
                    ContractParameter.hash160(account1.getScriptHash()),
                    ContractParameter.publicKey(pubKeyBytes1),
                    ContractParameter.publicKey((pubKeyBytes2))))
            .toArray();
    Wallet w = Wallet.withAccounts(account1);
    TransactionBuilder b = new NeoToken(neow).vote(account1.getScriptHash(),
            new ECPublicKey(pubKeyBytes1), new ECPublicKey(pubKeyBytes2))
            .signers(Signer.global(account1.getScriptHash()));
    assertThat(b.getSigners().get(0).getScriptHash(), is(account1.getScriptHash()));
    assertThat(b.getSigners().get(0).getScopes(), contains(WitnessScope.GLOBAL));
    assertThat(b.getScript(), is(expectedScript));
}