Add transaction.to_hex() test