boolean needsMigration() {
        File mappingFile = UserIdMapper.getConfigFile(usersDirectory);
        if (mappingFile.exists() && mappingFile.isFile()) {
            LOGGER.finest("User mapping file already exists. No migration needed.");
            return false;
        }
        File[] userDirectories = listUserDirectories();
        return userDirectories != null && userDirectories.length > 0;
    }
@Test
    public void migrateMultipleUsers() throws IOException {
        File usersDirectory = createTestDirectory(getClass(), name);
        IdStrategy idStrategy = IdStrategy.CASE_INSENSITIVE;
        UserIdMigrator migrator = new UserIdMigrator(usersDirectory, idStrategy);
        TestUserIdMapper mapper = new TestUserIdMapper(usersDirectory, idStrategy);
        mapper.init();
        assertThat(migrator.needsMigration(), is(false));
        mapper = new TestUserIdMapper(usersDirectory, idStrategy);
        mapper.init();
        assertThat(mapper.getConvertedUserIds().size(), is(3));
        assertThat(mapper.isMapped("fred"), is(true));
        assertThat(mapper.isMapped("foo/bar"), is(true));
        assertThat(mapper.isMapped("zzz\u1000"), is(true));
    }