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

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

    assertThat(result).hasSize(1).containsOnlyKeys("default");
    assertThat(result.get("default")).usingRecursiveComparison().isEqualTo(new LdapGroupMapping(configuration, "ldap"));
  }