public Map<String, LdapGroupMapping> getGroupMappings() {
    if (groupMappings == null) {
      createGroupMappings();
    }
    return groupMappings;
  }
@Test
  public void getGroupMappings_shouldCreateGroupMappings_whenMultipleLdapConfig() {
    Configuration configuration = generateMultipleLdapSettingsWithUserAndGroupMapping().asConfig();
    LdapSettingsManager settingsManager = new LdapSettingsManager(configuration);

    Map<String, LdapGroupMapping> result = settingsManager.getGroupMappings();

    assertThat(result).hasSize(2).containsOnlyKeys("example", "infosupport");
    assertThat(result.get("example")).usingRecursiveComparison().isEqualTo(new LdapGroupMapping(configuration, "ldap.example"));
    assertThat(result.get("infosupport")).usingRecursiveComparison().isEqualTo(new LdapGroupMapping(configuration, "ldap.infosupport"));
  }