class AddProcessProblemChange implements ProblemChange<CloudBalance> {

    private final LongFunction<CloudProcess> generator;

    public AddProcessProblemChange(LongFunction<CloudProcess> generator) {
        this.generator = generator;
    }

    @Override
    public void doChange(CloudBalance cloudBalance, ProblemChangeDirector problemChangeDirector) {<FILL_FUNCTION_BODY>}

}

        // Set a unique id on the new process
        long nextProcessId = 0L;
        for (CloudProcess otherProcess : cloudBalance.getProcessList()) {
            if (nextProcessId <= otherProcess.getId()) {
                nextProcessId = otherProcess.getId() + 1L;
            }
        }
        CloudProcess process = generator.apply(nextProcessId);
        // A SolutionCloner clones planning entity lists (such as processList), so no need to clone the processList here
        // Add the planning entity itself
        problemChangeDirector.addEntity(process, cloudBalance.getProcessList()::add);
    
<no_super_class>