@Override
  public Map<String, ScannerPlugin> installRequiredPlugins() {
    LOG.info("Loading required plugins");
    InstallResult result = installPlugins(p -> p.getRequiredForLanguages() == null || p.getRequiredForLanguages().isEmpty());

    LOG.debug("Plugins not loaded because they are optional: {}", result.skippedPlugins);

    return result.installedPluginsByKey;
  }
@Test
  public void reload_list_if_plugin_uninstalled_during_blue_green_switch() throws IOException {
    WsTestUtil.mockReader(wsClient, "api/plugins/installed",
      new InputStreamReader(getClass().getResourceAsStream("ScannerPluginInstallerTest/blue-installed.json")),
      new InputStreamReader(getClass().getResourceAsStream("ScannerPluginInstallerTest/green-installed.json")));
    enqueueNotFoundDownload("scmgit", "abc");
    enqueueDownload("java", "def");
    enqueueDownload("cobol", "ghi");

    Map<String, ScannerPlugin> result = underTest.installRequiredPlugins();

    assertThat(result.keySet()).containsExactlyInAnyOrder("java", "cobol");
  }