### Question:
ExchangeConfig extends AbstractConfig { public AbstractExchange buildExchange(ExchangeConfig defaultExchangeConfig) { if (!isDefaultConfigApplied()) { applyDefaultConfig(defaultExchangeConfig); } AbstractExchange exchange = new CustomExchange(getName(), getType().getValue(), getDurable(), getAutoDelete(), getArguments()); exchange.setInternal(getInternal()); exchange.setDelayed(getDelayed()); return exchange; }  boolean validate(); ExchangeConfig applyDefaultConfig(ExchangeConfig defaultExchangeConfig); AbstractExchange buildExchange(ExchangeConfig defaultExchangeConfig);  }### Answer:
@Test public void createExchangeWithDefaultConfigurationAppliedTest() { defaultExchangeConfig = ExchangeConfig.builder().build(); exchangeConfig = ExchangeConfig.builder().name(exchangeName).build(); expectedExchangeConfig = ExchangeConfig.builder() .name(exchangeName).type(ExchangeTypes.TOPIC).durable(false).autoDelete(false).delayed(false).internal(false).arguments(new HashMap<>()) .build(); AbstractExchange exchange = exchangeConfig.buildExchange(defaultExchangeConfig); assertExchange(exchange, expectedExchangeConfig); }