private static synchronized TestAccount findTestAccountMatchingIdentifier(String identifier) {
    retrieveTestAccountsForAppIfNeeded();

    for (TestAccount testAccount : appTestAccounts.values()) {
      if (testAccount.getName().contains(identifier)) {
        return testAccount;
      }
    }
    return null;
  }