YamlConfiguration extends FileConfiguration { @Override public YamlConfigurationOptions options() { if (this.options == null) { this.options = new YamlConfigurationOptions(this); } return (YamlConfigurationOptions) this.options; }  static YamlConfiguration loadConfiguration(final File file); static YamlConfiguration loadConfiguration(final InputStream stream); static YamlConfiguration loadConfiguration(final Reader reader); @Override String saveToString(); @Override void loadFromString(final String contents); @Override YamlConfigurationOptions options();  }
@Test void options() { final InputStreamOf stream = new InputStreamOf( new ResourceOf("test.yml")); final YamlConfiguration configuration = YamlConfiguration.loadConfiguration(stream); MatcherAssert.assertThat( "Couldn't create yaml options!", configuration.options(), new IsInstanceOf(YamlConfigurationOptions.class) ); final YamlConfigurationOptions defaultOptions = new YamlConfigurationOptions(configuration); MatcherAssert.assertThat( "Options are not default!", configuration.options(), new IsEqual<>(defaultOptions) ); }