private int getUniqueId(UserPrincipal user) {
        return maybeNumber(user.getName())
                .orElseGet(() -> idCache.computeIfAbsent(user, id -> uidGenerator.incrementAndGet()));
    }
Same as {@code com.google.common.jimfs.UnixAttributeProvider} except that getUniqueId() will return user
if user is a numerical string.
testutil/src/main/java/com/yahoo/vespa/test/file/UnixUidGidAttributeProvider.java