static ByteBuffer serializeAccounts(Collection<Account> accounts) throws IOException {
    return ByteBuffer.wrap(objectMapper.writeValueAsBytes(accounts));
  }
Serialize given account collection in json format in a {@link ByteBuffer}.
@param accounts The {@link Collection} of {@link Account}s.
@return {@link ByteBuffer} that contains the serialized bytes.
ambry-account/src/main/java/com/github/ambry/account/BackupFileManager.java