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 shouldFailQuietlyWhenExtraPropertiesHeaderValueIsInvalid() throws Exception {
        setupForNoChangesToMD5();

        final Map<Object, Object> before = System.getProperties().entrySet().stream().collect(toMap(Entry::getKey, Entry::getValue));

        expectHeaderValue(SystemEnvironment.AGENT_EXTRA_PROPERTIES_HEADER, encodeBase64String("this_is_invalid".getBytes(UTF_8)));
        agentUpgradeService.checkForUpgradeAndExtraProperties();

        final Map<Object, Object> after = System.getProperties().entrySet().stream().collect(toMap(Entry::getKey, Entry::getValue));

        assertThat(after).isEqualTo(before);
    }