@Test
  public void testUpdateFailureOnReadFromRouter() throws Exception {
    assumeTrue(!forBackfill);
    RouterStore store =
        new RouterStore(accountServiceMetrics, backup, helixStore, new AtomicReference<>(router), forBackfill,
            TOTAL_NUMBER_OF_VERSION_TO_KEEP, config);
    Map<Short, Account> idToRefAccountMap = new HashMap<>();
    Map<Short, Map<Short, Container>> idtoRefContainerMap = new HashMap<>();
    Set<Short> accountIDSet = new HashSet<>();
    // generate an new account and test update and fetch on this account
    AccountTestUtils.generateRefAccounts(idToRefAccountMap, idtoRefContainerMap, accountIDSet, 1, 1);
    assertUpdateAndFetch(store, idToRefAccountMap, idToRefAccountMap, 1, 1);

    // Now clear the router to remove the blob so next time when reading blob, it will remove an exception.
    router.clear();

    // generate another new account and test update and fetch on this account
    Map<Short, Account> anotherIdToRefAccountMap = new HashMap<>();
    AccountTestUtils.generateRefAccounts(anotherIdToRefAccountMap, idtoRefContainerMap, accountIDSet, 1, 1);
    for (Map.Entry<Short, Account> entry : anotherIdToRefAccountMap.entrySet()) {
      idToRefAccountMap.put(entry.getKey(), entry.getValue());
    }
    assertFalse("Update account should fail on read error", store.updateAccounts(anotherIdToRefAccountMap.values()));
  }
Test update when there is an read error from router. Update should fail.
@throws Exception Any error.
ambry-account/src/test/java/com/github/ambry/account/RouterStoreTest.java