### Question:
EthTransaction implements Transaction { @Override public byte[] rlpEncode(final SignatureData signatureData) { final RawTransaction rawTransaction = createTransaction(); final List<RlpType> values = TransactionEncoder.asRlpValues(rawTransaction, signatureData); final RlpList rlpList = new RlpList(values); return RlpEncoder.encode(rlpList); } EthTransaction(
      final EthSendTransactionJsonParameters transactionJsonParameters,
      final NonceProvider nonceProvider,
      final JsonRpcRequestId id); @Override void updateNonce(); @Override byte[] rlpEncode(final SignatureData signatureData); @Override boolean isNonceUserSpecified(); @Override String sender(); @Override JsonRpcRequest jsonRpcRequest(
      final String signedTransactionHexString, final JsonRpcRequestId id); @Override JsonRpcRequestId getId(); @Override String toString();  }### Answer:
@Test public void rlpEncodesTransaction() { final SignatureData signatureData = new SignatureData(new byte[] {1}, new byte[] {2}, new byte[] {3}); final byte[] rlpEncodedBytes = ethTransaction.rlpEncode(signatureData); final String rlpString = Numeric.toHexString(rlpEncodedBytes); final SignedRawTransaction decodedTransaction = (SignedRawTransaction) TransactionDecoder.decode(rlpString); assertThat(decodedTransaction.getTo()).isEqualTo("0xd46e8dd67c5d32be8058bb8eb970870f07244567"); assertThat(decodedTransaction.getGasLimit()).isEqualTo(Numeric.decodeQuantity("0x76c0")); assertThat(decodedTransaction.getGasPrice()).isEqualTo(Numeric.decodeQuantity("0x9184e72a000")); assertThat(decodedTransaction.getNonce()) .isEqualTo( Numeric.decodeQuantity( "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2")); assertThat(decodedTransaction.getValue()).isEqualTo(Numeric.decodeQuantity("0x0")); assertThat(decodedTransaction.getData()) .isEqualTo( "d46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"); final SignatureData decodedSignatureData = decodedTransaction.getSignatureData(); assertThat(trimLeadingZeroes(decodedSignatureData.getV())).isEqualTo(new byte[] {1}); assertThat(trimLeadingZeroes(decodedSignatureData.getR())).isEqualTo(new byte[] {2}); assertThat(trimLeadingZeroes(decodedSignatureData.getS())).isEqualTo(new byte[] {3}); }