AccountFactory { @ApiAudience.Public public Account create(final AccountAddress accountAddress) { assertNotNull(accountAddress); return new AccountWithAddress(accountAddress); }  @ApiAudience.Public Account create(final AccountAddress accountAddress); @ApiAudience.Public Account create(final AergoKey aergoKey); @ApiAudience.Private Account create(final AccountAddress accountAddress, final TxSigner txSigner);  }
@Test public void testCreateWithKey() { final AergoKey key = new AergoKeyGenerator().create(); final Account account = new AccountFactory().create(key); assertNotNull(account); }
@Test public void testCreateWithAddress() { final AergoKey key = new AergoKeyGenerator().create(); final Account account = new AccountFactory().create(key.getAddress()); assertNotNull(account); }
@Test public void testCreateWithAddressAndSigner() { final AergoKey key = new AergoKeyGenerator().create(); final Account account = new AccountFactory().create(key.getAddress(), mock(TxSigner.class)); assertNotNull(account); }