package com.example.helloworld.core;

import java.security.Principal;
import java.util.Set;

public class User implements Principal {
    private final String name;

    private final Set<String> roles;

    public User(String name) {
        this.name = name;
        this.roles = null;
    }

    public User(String name, Set<String> roles) {
        this.name = name;
        this.roles = roles;
    }

    public String getName() {
        return name;
    }

    public int getId() {
        return (int) (Math.random() * 100);
    }

    public Set<String> getRoles() {
        return roles;
    }
}

@@ -63,16 +63,41 @@
 ncipal;%0A
+import java.util.Random;%0A
 import j
@@ -526,31 +526,29 @@
 urn 
-(int) (Math.random() * 
+new Random().nextInt(
 100)

Replace Math.random() with Random.nextInt()