Signer extends NeoSerializable { @Override public int getSize() { int size = NeoConstants.SCRIPTHASH_SIZE + 1; if (this.scopes.contains(WitnessScope.CUSTOM_CONTRACTS)) { size += IOUtils.getVarSize(this.allowedContracts); } if (this.scopes.contains(WitnessScope.CUSTOM_GROUPS)) { size += IOUtils.getVarSize(this.allowedGroups); } return size; } Signer(); private  Signer(Builder builder); static Signer feeOnly(ScriptHash account); static Signer calledByEntry(ScriptHash account); static Signer global(ScriptHash account); ScriptHash getScriptHash(); List<WitnessScope> getScopes(); List<ScriptHash> getAllowedContracts(); List<ECKeyPair.ECPublicKey> getAllowedGroups(); @Override void deserialize(BinaryReader reader); @Override void serialize(BinaryWriter writer); @Override int getSize(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void getSize() { Signer c = new Signer.Builder() .account(acctScriptHash) .allowedGroups(groupPubKey1, groupPubKey2) .allowedContracts(contract1, contract2) .scopes(WitnessScope.CALLED_BY_ENTRY) .build(); int expectedSize = + 20 + 1 + 1 + 20 + 20 + 1 + 33 + 33; assertThat(c.getSize(), is(expectedSize)); }