public void should_not_install_on_unsupported_environment() {
BatchPluginRepository pluginRepository = mock(BatchPluginRepository.class);
when(pluginRepository.getPluginsByMetadata()).thenReturn(newPlugin(Foo.class, MavenExtension.class, AntExtension.class, new BarProvider()));
ComponentContainer container = new ComponentContainer();
ExtensionInstaller installer = new ExtensionInstaller(pluginRepository, new EnvironmentInformation("ant", "1.7"), mode);
installer.install(container, new TrueMatcher());
assertThat(container.getComponentByType(MavenExtension.class)).isNull();
assertThat(container.getComponentByType(AntExtension.class)).isNotNull();