class AmbariLdapDataPopulator {

  public LdapBatchDto synchronizeExistingLdapUsers(LdapBatchDto batchInfo) throws AmbariException {
    LOG.trace("Synchronize Existing LDAP users...");
    final Map<String, User> internalUsersMap = getInternalUsers();

    for (User user : internalUsersMap.values()) {
      if (user.isLdapUser()) {
        Set<LdapUserDto> userDtos = getLdapUsers(user.getUserName());
        if (userDtos.isEmpty()) {
          LdapUserDto userDto = new LdapUserDto();
          userDto.setUserName(user.getUserName());
          userDto.setDn(null);  // Setting to null since we do not know what the DN for this user was.
          batchInfo.getUsersToBeRemoved().add(userDto);
        }
      }
    }

    return batchInfo;
  }

  @Inject public  AmbariLdapDataPopulator(Provider<AmbariLdapConfiguration> configurationProvider, Users users);

}