### Question:
TransactionEncoder { static List<RlpType> asRlpValues( RawTransaction rawTransaction, Sign.SignatureData signatureData) { List<RlpType> result = new ArrayList<>(); result.add(RlpString.create(rawTransaction.getNonce())); result.add(RlpString.create(rawTransaction.getGasPrice())); result.add(RlpString.create(rawTransaction.getGasLimit())); String to = rawTransaction.getTo(); if (to != null && to.length() > 0) { result.add(RlpString.create(Numeric.hexStringToByteArray(to))); } else { result.add(RlpString.create("")); } result.add(RlpString.create(rawTransaction.getValue())); byte[] data = Numeric.hexStringToByteArray(rawTransaction.getData()); result.add(RlpString.create(data)); if (signatureData != null) { result.add(RlpString.create(signatureData.getV())); result.add(RlpString.create(Bytes.trimLeadingZeroes(signatureData.getR()))); result.add(RlpString.create(Bytes.trimLeadingZeroes(signatureData.getS()))); } return result; }  static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials); static byte[] signMessage(
            RawTransaction rawTransaction, byte chainId, Credentials credentials); static Sign.SignatureData createEip155SignatureData(
            Sign.SignatureData signatureData, byte chainId); static byte[] encode(RawTransaction rawTransaction); static byte[] encode(RawTransaction rawTransaction, byte chainId);  }### Answer:
@Test public void testEtherTransactionAsRlpValues() { List<RlpType> rlpStrings = TransactionEncoder.asRlpValues(createEtherTransaction(), new Sign.SignatureData((byte) 0, new byte[32], new byte[32])); assertThat(rlpStrings.size(), is(9)); assertThat(rlpStrings.get(3), equalTo(RlpString.create(new BigInteger("add5355", 16)))); }
@Test public void testContractAsRlpValues() { List<RlpType> rlpStrings = TransactionEncoder.asRlpValues( createContractTransaction(), null); assertThat(rlpStrings.size(), is(6)); assertThat(rlpStrings.get(3), is(RlpString.create(""))); }