@Test public void build() { final byte[] encryptedKey = "KEY".getBytes(); final byte[] encryptedPayload = "PAYLOAD".getBytes(); final byte[] nonce = "NONCE".getBytes(); final PublicKey from = PublicKey.from("SOMEKEY".getBytes()); final RawTransaction txn = RawTransactionBuilder.create() .withEncryptedKey(encryptedKey) .withEncryptedPayload(encryptedPayload) .withNonce(nonce) .withFrom(from) .build(); assertThat(txn).isNotNull(); assertThat(txn.getEncryptedKey()).isEqualTo(encryptedKey); assertThat(txn.getEncryptedPayload()).isEqualTo(encryptedPayload); assertThat(txn.getFrom()).isEqualTo(from); assertThat(txn.getNonce().getNonceBytes()).isEqualTo(nonce); }
public RawTransaction build() { return new RawTransaction(encryptedPayload, encryptedKey, new Nonce(nonce), from); }
RawTransactionBuilder { public RawTransaction build() { return new RawTransaction(encryptedPayload, encryptedKey, new Nonce(nonce), from); } }
RawTransactionBuilder { public RawTransaction build() { return new RawTransaction(encryptedPayload, encryptedKey, new Nonce(nonce), from); } private  RawTransactionBuilder(); }
RawTransactionBuilder { public RawTransaction build() { return new RawTransaction(encryptedPayload, encryptedKey, new Nonce(nonce), from); } private  RawTransactionBuilder(); static RawTransactionBuilder create(); RawTransactionBuilder withEncryptedPayload(final byte[] encryptedPayload); RawTransactionBuilder withEncryptedKey(final byte[] encryptedKey); RawTransactionBuilder withFrom(final PublicKey from); RawTransactionBuilder withNonce(final byte[] nonce); RawTransaction build(); }
RawTransactionBuilder { public RawTransaction build() { return new RawTransaction(encryptedPayload, encryptedKey, new Nonce(nonce), from); } private  RawTransactionBuilder(); static RawTransactionBuilder create(); RawTransactionBuilder withEncryptedPayload(final byte[] encryptedPayload); RawTransactionBuilder withEncryptedKey(final byte[] encryptedKey); RawTransactionBuilder withFrom(final PublicKey from); RawTransactionBuilder withNonce(final byte[] nonce); RawTransaction build();  }