@Bean("ModuleConfiguration")
  public ModuleConfiguration provide(GlobalConfiguration globalConfig, DefaultInputModule module, GlobalServerSettings globalServerSettings,
    ProjectServerSettings projectServerSettings) {
    Map<String, String> settings = new LinkedHashMap<>();
    settings.putAll(globalServerSettings.properties());
    settings.putAll(projectServerSettings.properties());
    addScannerSideProperties(settings, module.definition());

    settings = sonarGlobalPropertiesFilter.enforceOnlyServerSideSonarGlobalPropertiesAreUsed(settings, globalServerSettings.properties());

    return new ModuleConfiguration(globalConfig.getDefinitions(), globalConfig.getEncryption(), settings);
  }
@Test
  public void should_concatAllPropertiesForCallFilterAndApplyFilterChanges() {
    when(globalServerSettings.properties()).thenReturn(GLOBAL_SERVER_PROPERTIES);
    when(projectServerSettings.properties()).thenReturn(PROJECT_SERVER_PROPERTIES);
    when(sonarGlobalPropertiesFilter.enforceOnlyServerSideSonarGlobalPropertiesAreUsed(ALL_PROPERTIES_MAP, GLOBAL_SERVER_PROPERTIES))
      .thenReturn(PROPERTIES_AFTER_FILTERING);

    ModuleConfiguration provide = provider.provide(globalConfiguration, defaultInputProject, globalServerSettings, projectServerSettings);

    verify(sonarGlobalPropertiesFilter).enforceOnlyServerSideSonarGlobalPropertiesAreUsed(ALL_PROPERTIES_MAP, GLOBAL_SERVER_PROPERTIES);
    assertThat(provide.getOriginalProperties()).containsExactlyEntriesOf(PROPERTIES_AFTER_FILTERING);
  }