private void assertUpdateAndFetch(RouterStore store, Map<Short, Account> allAccounts,
      Map<Short, Account> accountsToUpdate, int version, int count) {
    // verify that updateAccount works again
    boolean succeeded = store.updateAccounts(accountsToUpdate.values());
    assertTrue("Update accounts failed at router store", succeeded);

    // verify that fetchAccountMetadata can fetch the accounts we just updated.
    Collection<Account> accounts = store.fetchAccountMetadata();
    assertAccountsEqual(accounts, allAccounts);

    List<RouterStore.BlobIDAndVersion> blobIDAndVersions = getBlobIDAndVersionInHelix(count);
    RouterStore.BlobIDAndVersion blobIDAndVersion = null;
    for (RouterStore.BlobIDAndVersion current : blobIDAndVersions) {
      if (current.getVersion() == version) {
        blobIDAndVersion = current;
        break;
      }
    }
    assertNotNull("Version " + version + " expected", blobIDAndVersion);
    Map<String, String> accountMap = store.readAccountMetadataFromBlobID(blobIDAndVersion.getBlobID());
    assertAccountsEqual(accountMap, allAccounts);
  }
call {@link RouterStore#updateAccounts(Collection)} to update {@link Account} metadata then call {@link RouterStore#fetchAccountMetadata()}
to fetch the {@link Account} metadata back and compare them. Also it fetches the {@link Account} metadata directly from ambry-server
and compare them.
@param store The {@link RouterStore}.
@param allAccounts The whole set of {@link Account} metadata after update.
@param accountsToUpdate The {@link Account} to update
@param version The expected version of blob id to fetch {@link Account} metadata from ambry-server.
ambry-account/src/test/java/com/github/ambry/account/RouterStoreTest.java