public static Set<Service> getMostUselessServicesMutated(Server server, Map<Server, Set<Application>> connections) {
        Set<Service> mutatedServices = new LinkedHashSet<>();
        List<Service> sortedServices = getServicesOrderedByUsage(server, connections);
        if (server.getServices() != null) {
            for (Service service : Simulator.getInstance().getServicePool()) {
                if (!server.getServices().contains(service)) {
                    double mutationProbability = (sortedServices.size() / 2.) / (double)(Simulator.getInstance().getServicePool().size() - server.getServices().size());
                    if (Simulator.getInstance().getRandom().nextDouble() < mutationProbability/*service.getMutationProbability()*/) {
                        mutatedServices.add(service);
                    } else {
                        if (server.getServices().contains(service)) {
                            mutatedServices.add(service);
                        }
                    }
                } else {
                    double mutationProbability = (sortedServices.indexOf(service) + 1) / (double) sortedServices.size();
                    if (Simulator.getInstance().getRandom().nextDouble() < mutationProbability) {
                        //mutatedServices.add(new ArrayList<>(Simulator.getInstance().getServicePool()).get(
                        //        Simulator.getInstance().getRandom().nextInt(Simulator.getInstance().getServicePool().size())));
                    } else {
                        mutatedServices.add(service);
                    }
                }
            }
        }
        return mutatedServices;
    }