class UsersStateDifference {

    public static ImmutableSet<String> calculateUsersToRemove(UmsUsersState umsState, UsersState ipaState) {
        Collection<String> umsStateUsers = umsState.getUsersState().getGroupMembership().get(UserSyncConstants.CDP_USERSYNC_INTERNAL_GROUP);
        Collection<String> ipaStateUsers = ipaState.getGroupMembership().get(UserSyncConstants.CDP_USERSYNC_INTERNAL_GROUP);

        ImmutableSet<String> usersToRemove = ImmutableSet.copyOf(ipaStateUsers.stream()
                .filter(ipaUser -> !umsStateUsers.contains(ipaUser))
                .filter(ipaUser -> !FreeIpaChecks.IPA_PROTECTED_USERS.contains(ipaUser))
                .collect(Collectors.toSet()));

        LOGGER.info("usersToRemove size = {}", usersToRemove.size());
        LOGGER.debug("usersToRemove = {}", usersToRemove);

        return usersToRemove;
    }

    public  UsersStateDifference(ImmutableSet<FmsGroup> groupsToAdd, ImmutableSet<FmsGroup> groupsToRemove,
            ImmutableSet<FmsUser> usersToAdd, ImmutableSet<String> usersToRemove,
            ImmutableMultimap<String, String> groupMembershipToAdd, ImmutableMultimap<String, String> groupMembershipToRemove);

}