### Question:
Account { public SignedTransaction sign(final Transaction transaction, final String generationHash) { return transaction.signWith(this, generationHash); } Account(String privateKey, NetworkType networkType);  Account(KeyPair keyPair, NetworkType networkType); static Account createFromPrivateKey(String privateKey, NetworkType networkType); static Account generateNewAccount(NetworkType networkType); String getPublicKey(); String getPrivateKey(); KeyPair getKeyPair(); Address getAddress(); PublicAccount getPublicAccount(); SignedTransaction sign(final Transaction transaction, final String generationHash); CosignatureSignedTransaction signCosignatureTransaction(
      CosignatureTransaction cosignatureTransaction); CosignatureSignedTransaction signCosignatureTransaction(String transactionHash); SignedTransaction signTransactionWithCosignatories(
      final AggregateTransaction transaction,
      final List<Account> cosignatories,
      final String generationHash); SignedTransaction signTransactionGivenSignatures(
      final AggregateTransaction transaction,
      final List<AggregateTransactionCosignature> cosignatures,
      final String generationHash); NetworkType getNetworkType();  }### Answer:
@Test void shouldSignTransaction() { Account account = new Account( "787225aaff3d2c71f4ffa32d4f19ec4922f3cd869747f267378f81f8e3fcb12d", NetworkType.MIJIN_TEST); TransferTransaction transferTransaction = TransferTransactionFactory.create( NetworkType.MIJIN_TEST, new Address("SDZWZJUAYNOWGBTCUDBY3SE5JF4NCC2RDM6SIGQ", NetworkType.MIJIN_TEST), Collections.singletonList( new Mosaic( new MosaicId(new BigInteger("95442763262823")), BigInteger.valueOf(100)))) .message(new PlainMessage("")) .deadline(new FakeDeadline()) .build(); SignedTransaction signedTransaction = account.sign(transferTransaction, generationHash); String payload = signedTransaction.getPayload(); assertEquals( "B10000000000000013193EF4F0D94DE26249D196A0575944877D5572CE13B80E4E8380FA34F9F54FF936F96162473857546F7B624A6248D8F7B3D0142DC85BBB06EB7BFEE125880B2134E47AEE6F2392A5B3D1238CD7714EABEB739361B7CCF24BAE127F10DF17F200000000019054410000000000000000010000000000000090F36CA680C35D630662A0C38DC89D4978D10B511B3D241A0100010000000000672B0000CE560000640000000000000000", payload); assertEquals( "58D649ABF9A26AFB3F070E26F157920DAB6423415B4344108B93EDD80DE330E5", signedTransaction.getHash()); }