shadows/framework/src/main/java/org/robolectric/shadows/ShadowUserManager.java
public long addUserProfile(UserHandle userHandle) {
    long serialNumber = nextUserSerial++;
    userProfiles.put(userHandle, serialNumber);
    return serialNumber;
  }
public long addUserProfile(UserHandle userHandle) {
    long serialNumber = nextUserSerial++;
    userProfiles.put(userHandle, serialNumber);
    return serialNumber;
  }
Adds a profile associated for the user that the calling process is running on.

The user is assigned an arbitrary unique serial number.

@return the user's serial number