@Bean("GlobalConfiguration")
  public GlobalConfiguration provide(GlobalServerSettings globalServerSettings, ScannerProperties scannerProps, PropertyDefinitions propertyDefinitions) {
    Map<String, String> mergedSettings = new LinkedHashMap<>();
    mergedSettings.putAll(globalServerSettings.properties());
    mergedSettings.putAll(scannerProps.properties());
    return new GlobalConfiguration(propertyDefinitions, scannerProps.getEncryption(), mergedSettings);
  }
@Test
  public void should_load_global_settings() {
    when(globalServerSettings.properties()).thenReturn(ImmutableMap.of("sonar.cpd.cross", "true"));

    GlobalConfiguration globalConfig = new GlobalConfigurationProvider().provide(globalServerSettings, scannerProps, new PropertyDefinitions(System2.INSTANCE));

    assertThat(globalConfig.get("sonar.cpd.cross")).hasValue("true");
  }