@Override
    public int launch(AgentLaunchDescriptor descriptor) {
        LogConfigurator logConfigurator = new LogConfigurator("agent-launcher-logback.xml");
        return logConfigurator.runWithLogger(() -> doLaunch(descriptor));
    }
@Test
    public void shouldPassLauncherVersionToAgent() throws IOException {
        final List<String> actualVersion = new ArrayList<>();
        final AgentLauncher launcher = new AgentLauncherImpl((launcherVersion, launcherMd5, urlConstructor, environmentVariables, context) -> {
            actualVersion.add(launcherVersion);
            return 0;
        });
        TEST_AGENT_LAUNCHER.copyTo(AGENT_LAUNCHER_JAR);
        launcher.launch(launchDescriptor());

        assertThat(actualVersion.size(), is(1));
        assertThat(actualVersion.get(0), is(CurrentGoCDVersion.getInstance().fullVersion()));
    }