public static Collection<Account> accountsFromInputStreamInJson(InputStream inputStream) throws IOException {
    Map<String, Collection<Account>> map =
        objectMapper.readValue(inputStream, new TypeReference<Map<String, Collection<Account>>>() {
        });
    return map.getOrDefault(ACCOUNTS_KEY, Collections.emptyList());
  }
Deserialize a collection of {@link Account} in json from given InputStream.
@param inputStream the {@link InputStream} that contains serialized json bytes.
@return a {@link Collection} of {@link Account}s.
ambry-api/src/main/java/com/github/ambry/account/AccountCollectionSerde.java