public void addToIfExists(EnvironmentVariableContext context) {
        if (context.hasProperty(getName())) {
            addTo(context);
        }
    }
@Test
    void addToIfExists_shouldAddEnvironmentVariableToEnvironmentVariableContextWhenVariableIsAlreadyExistInContext() {
        final EnvironmentVariableContext environmentVariableContext = mock(EnvironmentVariableContext.class);
        final EnvironmentVariable environmentVariable = new EnvironmentVariable("foo", "bar");

        when(environmentVariableContext.hasProperty("foo")).thenReturn(true);

        environmentVariable.addToIfExists(environmentVariableContext);

        verify(environmentVariableContext, times(1)).setProperty("foo", "bar", false);
    }