### Question:
HashLockTransaction extends Transaction { public String getHash() { return hash; } HashLockTransaction(HashLockTransactionFactory factory); Mosaic getMosaic(); BigInteger getDuration(); String getHash();  }### Answer:
@Test void serializeAndSignTransaction() { SignedTransaction signedTransaction = new SignedTransaction( Account.generateNewAccount(networkType).getPublicAccount(), "payload", "8498B38D89C1DC8A448EA5824938FF828926CD9F7747B1844B59B4B6807E878B", TransactionType.AGGREGATE_BONDED); HashLockTransaction transaction = HashLockTransactionFactory.create( networkType, NetworkCurrency.CAT_CURRENCY.createRelative(BigInteger.valueOf(10)), BigInteger.valueOf(100), signedTransaction) .deadline(new FakeDeadline()) .build(); SignedTransaction lockFundsTransactionSigned = transaction.signWith(account, generationHash); String payload = lockFundsTransactionSigned.getPayload(); assertEquals( "010000000000000044B262C46CEABB85809698000000000064000000000000008498B38D89C1DC8A448EA5824938FF828926CD9F7747B1844B59B4B6807E878B", payload.substring(240)); assertEquals( "C29536DFA2B6FFBE112965F7695ADCB9D67F9984139709ED5A6A51BF8700BBDB", lockFundsTransactionSigned.getHash()); }