@Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        try {
            File pluginsFolder = new File(systemEnvironment.get(SystemEnvironment.AGENT_PLUGINS_PATH));

            if (pluginsFolder.exists()) {
                FileUtils.forceDelete(pluginsFolder);
            }
            zipUtil.unzip(DownloadableFile.AGENT_PLUGINS.getLocalFile(), pluginsFolder);
            defaultPluginJarLocationMonitor.initialize();
            pluginManager.startInfrastructure(false);
        } catch (IOException e) {
            LOG.warn("could not extract plugin zip", e);
        } catch (RuntimeException e) {
            LOG.warn("error while initializing agent plugins", e);
        }
    }
@Test
    void shouldHandleIOExceptionQuietly() throws Exception {
        doThrow(new IOException()).when(zipUtil).unzip(DownloadableFile.AGENT_PLUGINS.getLocalFile(), new File(SystemEnvironment.PLUGINS_PATH));
        try {
            agentPluginsInitializer.onApplicationEvent(null);
        } catch (Exception e) {
            fail("should have handled IOException");
        }
    }