Map<String, File> scanExistingUsers() throws IOException {
        Map<String, File> users = new HashMap<>();
        File[] userDirectories = listUserDirectories();
        if (userDirectories != null) {
            for (File directory : userDirectories) {
                String userId = idStrategy.idFromFilename(directory.getName());
                users.put(userId, directory);
            }
        }
        addEmptyUsernameIfExists(users);
        return users;
    }
@Test
    public void scanExistingUsersCaseSensitive() throws IOException {
        File usersDirectory = createTestDirectory(getClass(), name);
        UserIdMigrator migrator = new UserIdMigrator(usersDirectory, new IdStrategy.CaseSensitive());
        Map<String, File> userMappings = migrator.scanExistingUsers();
        assertThat(userMappings.keySet(), hasSize(3));
        assertThat(userMappings.keySet(), hasItems("admin", "Fred", "Jane"));
    }