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 needsMigrationNoneExisting() throws IOException {
        UserIdMigrator migrator = createUserIdMigrator();
        assertThat(migrator.needsMigration(), is(false));
    }