DefaultConfigurationBuilder implements ConfigurationBuilder { public ConfigurationBuilder setConfiguration(Configuration configuration) { setContext(configuration.getContext()); return this; } DefaultConfigurationBuilder();  DefaultConfigurationBuilder(ConfigurationContext context);  DefaultConfigurationBuilder(Configuration configuration); @Override ConfigurationBuilder setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override ConfigurationBuilder setServiceContext(ServiceContext serviceContext); ConfigurationBuilder setConfiguration(Configuration configuration); @Override ConfigurationBuilder setContext(ConfigurationContext context); @Override ConfigurationBuilder setMeta(String property, String key, String value); @Override ConfigurationBuilder setMeta(String property, Map<String, String> metaData); @Override ConfigurationBuilder addPropertySources(Collection<PropertySource> sources); ConfigurationBuilder addDefaultPropertyFilters(); ConfigurationBuilder addDefaultPropertySources(); ConfigurationBuilder addDefaultPropertyConverters(); @Override ConfigurationBuilder removePropertySources(Collection<PropertySource> propertySources); @Override List<PropertySource> getPropertySources(); @Override ConfigurationBuilder increasePriority(PropertySource propertySource); @Override ConfigurationBuilder decreasePriority(PropertySource propertySource); @Override ConfigurationBuilder highestPriority(PropertySource propertySource); @Override ConfigurationBuilder lowestPriority(PropertySource propertySource); @Override ConfigurationBuilder addPropertyFilters(Collection<PropertyFilter> filters); @Override ConfigurationBuilder removePropertyFilters(Collection<PropertyFilter> filters); @Override ConfigurationBuilder removePropertyConverters(TypeLiteral<T> typeToConvert,
                                                                    Collection<PropertyConverter<T>> converters); @Override ConfigurationBuilder removePropertyConverters(TypeLiteral<?> typeToConvert); @Override ConfigurationBuilder addPropertyConverters(TypeLiteral<T> type, Collection<PropertyConverter<T>> propertyConverters); @Override Configuration build(); @Override ConfigurationBuilder sortPropertyFilter(Comparator<PropertyFilter> comparator); @Override ConfigurationBuilder sortPropertySources(Comparator<PropertySource> comparator); @Override ConfigurationBuilder sortPropertyConverter(Comparator<PropertyConverter> comparator); @Override List<PropertyFilter> getPropertyFilters(); @Override Map<TypeLiteral<?>, List<PropertyConverter<?>>> getPropertyConverter();  }
@Test public void setConfiguration() throws Exception { Configuration cfg = Configuration.current(); ConfigurationBuilder b = new DefaultConfigurationBuilder() .setConfiguration(cfg); assertThat(b.build()).isEqualTo(cfg); }