public void checkForUpgradeAndExtraProperties() throws IOException {
        if (upgradesEnabled()) {
            checkForUpgradeAndExtraProperties(systemEnvironment.getAgentMd5(), systemEnvironment.getGivenAgentLauncherMd5(),
                    systemEnvironment.getAgentPluginsMd5(), systemEnvironment.getTfsImplMd5());
        } else {
            LOGGER.debug("[Agent Upgrade] Skipping check as there is no wrapping launcher to relaunch the agent JVM...");
        }
    }
@Test
    void shouldSetAnyExtraPropertiesSentByTheServer() throws Exception {
        setupForNoChangesToMD5();

        expectHeaderValue(SystemEnvironment.AGENT_EXTRA_PROPERTIES_HEADER, encodeBase64String("abc=def%20ghi  jkl%20mno=pqr%20stu".getBytes(UTF_8)));
        agentUpgradeService.checkForUpgradeAndExtraProperties();

        assertThat(System.getProperty("abc")).isEqualTo("def ghi");
        assertThat(System.getProperty("jkl mno")).isEqualTo("pqr stu");
    }