private static void saveAccountsToFile(Collection<Account> accounts, Path filePath) {
    try {
      BackupFileManager.writeAccountsToFile(filePath, accounts);
    } catch (Exception e) {
      fail("Fail to write state to file: " + filePath.toString());
    }
  }
Save the collection of {@link Account} to the given file.
@param accounts The collection of {@link Account}.
@param filePath The given file.
ambry-account/src/test/java/com/github/ambry/account/BackupFileManagerTest.java