CoreConfiguration extends DefaultConfiguration { @Override public ConfigurationBuilder toBuilder() { return new CoreConfigurationBuilder(this); } CoreConfiguration(ConfigurationContext context); @Override ConfigurationBuilder toBuilder();  }
@Test public void getPropertyFilters() throws Exception { Configuration cfg = new CoreConfigurationBuilder().build(); PropertyFilter testFilter = new PropertyFilter() { @Override public PropertyValue filterProperty(PropertyValue value, FilterContext ctx) { return value; } }; assertThat(cfg.getContext().getPropertyFilters()).isNotNull().doesNotContain(testFilter); cfg = cfg.toBuilder().addPropertyFilters(testFilter).build(); assertThat(cfg.getContext().getPropertyFilters()).contains(testFilter); }
@Test public void toBuilder() throws Exception { assertThat(new CoreConfigurationBuilder().build().toBuilder()).isNotNull(); }
@Test public void testRoundTrip() throws Exception { Configuration cfg = new CoreConfigurationBuilder().build(); assertThat(cfg).isEqualTo(cfg.toBuilder().build()); }