### Question:
QueueConfig extends AbstractConfig { public Queue buildDeadLetterQueue(QueueConfig defaultQueueConfig, DeadLetterConfig deadLetterConfig) { if (!isDefaultConfigApplied()) { applyDefaultConfig(defaultQueueConfig); } return new Queue(deadLetterConfig.createDeadLetterQueueName(getName()), getDurable(), getExclusive(), getAutoDelete(), getArguments()); }  boolean validate(); QueueConfig applyDefaultConfig(QueueConfig defaultQueueConfig); Queue buildQueue(QueueConfig defaultQueueConfig, DeadLetterConfig deadLetterConfig); Queue buildDeadLetterQueue(QueueConfig defaultQueueConfig, DeadLetterConfig deadLetterConfig);  }### Answer:
@Test public void createDeadLetterQueueWithDefaultConfigurationAppliedTest() { defaultQueueConfig = QueueConfig.builder().deadLetterEnabled(true).build(); queueConfig = QueueConfig.builder().name(queueName).build(); deadLetterConfig = DeadLetterConfig.builder().deadLetterExchange(ExchangeConfig.builder().name("dead-letter-exchange").build()) .queuePostfix(".dlq-new") .build(); expectedQueueConfig = QueueConfig.builder() .name(queueName + ".dlq-new").durable(false).autoDelete(false).exclusive(false).arguments(new HashMap<>()) .build(); Queue queue = queueConfig.buildDeadLetterQueue(defaultQueueConfig, deadLetterConfig); assertQueue(queue, expectedQueueConfig); }