### Question:
KinClient { public KinAccount getAccount(int index) { if (index >= 0 && kinAccounts.size() > index) { return kinAccounts.get(index); } return null; } KinClient(@NonNull Context context, @NonNull ServiceProvider provider, @NonNull String storeKey);  KinClient(@NonNull Context context, @NonNull ServiceProvider provider); @VisibleForTesting  KinClient(ServiceProvider serviceProvider, KeyStore keyStore, TransactionSender transactionSender,
        AccountActivator accountActivator, AccountInfoRetriever accountInfoRetriever,
        BlockchainEventsCreator blockchainEventsCreator, BackupRestore backupRestore); @NonNull KinAccount addAccount(); @NonNull KinAccount importAccount(@NonNull String exportedJson, @NonNull String passphrase); KinAccount getAccount(int index); boolean hasAccount(); @SuppressWarnings("WeakerAccess") int getAccountCount(); void deleteAccount(int index); @SuppressWarnings("WeakerAccess") void clearAllAccounts(); ServiceProvider getServiceProvider();  }### Answer:
@Test public void getAccount_ExistingMultipleAccount() throws Exception { KeyPair account1 = createRandomAccount(); KeyPair account2 = createRandomAccount(); fakeKeyStore = new FakeKeyStore(Arrays.asList(account1, account2)); kinClient = createNewKinClient(); KinAccount expectedAccount2 = kinClient.getAccount(1); KinAccount expectedAccount1 = kinClient.getAccount(0); assertNotNull(expectedAccount1); assertNotNull(expectedAccount2); assertThat(account1.getAccountId(), equalTo(expectedAccount1.getPublicAddress())); assertThat(account2.getAccountId(), equalTo(expectedAccount2.getPublicAddress())); }
@Test public void getAccount_NegativeIndex() throws Exception { createKeyStoreWithRandomAccount(); assertNull(kinClient.getAccount(-1)); }
@Test public void getAccount_EmptyKeyStore_Null() throws Exception { KinAccount kinAccount = kinClient.getAccount(0); assertNull(kinAccount); }
@Test public void getAccount_ExistingAccount_SameAccount() throws Exception { KeyPair account = createKeyStoreWithRandomAccount(); KinAccount kinAccount = kinClient.getAccount(0); assertEquals(account.getAccountId(), kinAccount.getPublicAddress()); }