@Test
public void serializeWithoutAttributesAndWitnesses() {

    List<Signer> signers = new ArrayList<>();
    signers.add(Signer.calledByEntry(account1));
    List<Witness> witnesses = new ArrayList<>();
    witnesses.add(new Witness(new byte[]{0x00}, new byte[]{0x00}));
    Transaction tx = new Transaction(neow,
            (byte) 0,
            0x01020304L,
            0x01020304L,
            signers,
            BigInteger.TEN.pow(8).longValue(),
            1L,
            new ArrayList<>(),
            new byte[]{(byte) OpCode.PUSH1.getCode()},
            new ArrayList<>());
    byte[] actual = tx.toArray();
    byte[] expected = Numeric.hexStringToByteArray(""
            + "00" // version
            + "04030201"  // nonce
            + "00e1f50500000000"  // system fee (1 GAS)
            + "0100000000000000"  // network fee (1 GAS fraction)
            + "04030201"  // valid until block
            + "01" + "23ba2703c53263e8d6e522dc32203339dcd8eee9" + "01"
            // one calledByEntry signer with scope
            + "00"
            + "01" + OpCode.PUSH1.toString() // 1-byte script with PUSH1 OpCode
            + "00"); // no witnesses
    assertArrayEquals(expected, actual);
}