public List<PluginRoleConfig> pluginRoleConfigsFor(String authConfigId) {
        List<PluginRoleConfig> rolesConfig = new ArrayList<>();
        for (Role role : this) {
            if (role instanceof PluginRoleConfig) {
                if (((PluginRoleConfig) role).getAuthConfigId().equals(authConfigId)) {
                    rolesConfig.add((PluginRoleConfig) role);
                }
            }
        }

        return rolesConfig;
    }
@Test
    public void shouldBeAbleToFetchPluginRolesForAAuthConfig() throws Exception {
        PluginRoleConfig admin = new PluginRoleConfig("admin", "corporate_ldap");
        PluginRoleConfig view = new PluginRoleConfig("view", "corporate_ldap");
        PluginRoleConfig operator = new PluginRoleConfig("operator", "internal_ldap");

        RolesConfig rolesConfig = new RolesConfig(admin, view, operator, new RoleConfig(new CaseInsensitiveString("committer")));

        assertThat(rolesConfig.pluginRoleConfigsFor("corporate_ldap"), hasSize(2));
        assertThat(rolesConfig.pluginRoleConfigsFor("corporate_ldap"), containsInAnyOrder(admin, view));

        assertThat(rolesConfig.pluginRoleConfigsFor("internal_ldap"), hasSize(1));
        assertThat(rolesConfig.pluginRoleConfigsFor("internal_ldap"), containsInAnyOrder(operator));
    }