File putIfAbsent(String userId, boolean saveToDisk) throws IOException {
        String idKey = getIdStrategy().keyFor(userId);
        String directoryName = idToDirectoryNameMap.get(idKey);
        File directory = null;
        if (directoryName == null) {
            synchronized (this) {
                directoryName = idToDirectoryNameMap.get(idKey);
                if (directoryName == null) {
                    directory = createDirectoryForNewUser(userId);
                    directoryName = directory.getName();
                    idToDirectoryNameMap.put(idKey, directoryName);
                    if (saveToDisk) {
                        save();
                    }
                }
            }
        }
        return directory == null ? new File(usersDirectory, directoryName) : directory;
    }
@Test
    public void testDirectoryFormatLongerUserId() throws IOException {
        UserIdMapper mapper = createUserIdMapper(IdStrategy.CASE_INSENSITIVE);
        String user1 = "muchlongeruserid";
        File directory1 = mapper.putIfAbsent(user1, true);
        assertThat(directory1.getName(), startsWith("muchlongeruser_"));
    }