@Test
    @ConfiguredWithCode("MavenConfiguratorTest.yml")
    void should_configure_maven_tools_and_global_config(JenkinsConfiguredWithCodeRule j) {
        final Maven.DescriptorImpl descriptor = (Maven.DescriptorImpl) j.jenkins.getDescriptorOrDie(Maven.class);
        assertEquals(1, descriptor.getInstallations().length);
        assertEquals("/usr/share/maven", descriptor.getInstallations()[0].getHome());

        InstallSourceProperty installSourceProperty =
                descriptor.getInstallations()[0].getProperties().get(InstallSourceProperty.class);
        assertEquals("3.5.0", installSourceProperty.installers.get(Maven.MavenInstaller.class).id);

        final SettingsProvider provider = GlobalMavenConfig.get().getSettingsProvider();
        assertInstanceOf(FilePathSettingsProvider.class, provider);
        assertEquals("/usr/share/maven-settings.xml", ((FilePathSettingsProvider) provider).getPath());
    }
@author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
test-harness/src/test/java/io/jenkins/plugins/casc/core/MavenConfiguratorTest.java