@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 // Account script hash
            + 1 // Scope byte
            + 1 // length byte of allowed contracts list
            + 20 + 20 // Script hashes of two allowed contracts
            + 1 // length byte of allowed groups list
            + 33 + 33; // Public keys of two allowed groups
    assertThat(c.getSize(), is(expectedSize));
}