### Question:
Config { public static Config loadDemoConfig() throws IOException { LOGGER.log(Level.WARNING, "Loading the default configuration sample from resource {0}/sample.yml", Config.class); try (InputStream istream = Config.class.getResourceAsStream("sample.yml")) { if (istream == null) { throw new FileNotFoundException(String.format("Cannot load the demo config: %s/sample.yml", Config.class)); } return load(istream, false); } }  static Config loadDemoConfig(); static Config loadConfig(@Nonnull File configPath); File getOutputWar(); File getOutputBOM(); @CheckForNull GroovyHookInfo getHookById(@Nonnull String id); List<WARResourceInfo> getAllExtraResources(); @CheckForNull WARResourceInfo findResourceById(@Nonnull String id); @CheckForNull DependencyInfo findPlugin(@Nonnull String artifactId); @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH", justification = "plugins is initialized before") void overrideByPOM(@Nonnull File tmpDir, @Nonnull File pom, final boolean pomIgnoreRoot); void overrideByBOM(@Nonnull BOM bom, @CheckForNull String environmentName); public BuildSettings buildSettings; public PackageInfo bundle; public WarInfo war; @CheckForNull
    public Collection<DependencyInfo> plugins; @CheckForNull
    public Collection<DependencyInfo> libPatches; @CheckForNull
    public Collection<DependencyInfo> libExcludes; @CheckForNull
    public Map<String, String> systemProperties; @CheckForNull
    public Collection<GroovyHookInfo> groovyHooks; @CheckForNull
    public Collection<CasCConfig> casc; }### Answer:
@Test public void shouldBeAbleToLoadDefaultsFromSample() throws Exception { Config cfg = Config.loadDemoConfig(); assertEquals("mywar", cfg.bundle.artifactId); assertEquals("jenkins-war", cfg.war.artifactId); assertNotNull("Build settings should be initialized with defaults", cfg.buildSettings); }