private static void writeAccountsToFile(Collection<Account> accounts, String filePath) throws Exception {
    Files.write(Paths.get(filePath), new ObjectMapper().writeValueAsBytes(accounts));
  }
Writes a collection of {@link Account}s into a file. The file contains and only contains a {@link JSONArray}, where
each element is the json string of the {@link Account}.
@param accounts The collection of {@link Account}s to write to the file.
@param filePath The path of the file to write.
@throws Exception Any unexpected exception.
ambry-tools/src/integration-test/java/com/github/ambry/account/AccountUpdateToolTest.java