### Question:
QueueDetail { public QueueConfig toConfig() { QueueConfig queueConfig = QueueConfig.builder() .name(name) .numRetry(numRetry) .queueName(queueName) .delayedQueueName(delayedQueueName) .processingQueueName(processingQueueName) .visibilityTimeout(visibilityTimeout) .createdOn(System.currentTimeMillis()) .updatedOn(System.currentTimeMillis()) .deadLetterQueues(new LinkedList<>()) .concurrency(concurrency.toMinMax()) .priority(Collections.unmodifiableMap(priority)) .priorityGroup(priorityGroup) .systemGenerated(systemGenerated) .build(); if (isDlqSet()) { queueConfig.addDeadLetterQueue(getDeadLetterQueue()); } return queueConfig; }  boolean isDlqSet(); DeadLetterQueue getDeadLetterQueue(); QueueConfig toConfig();  }### Answer:
@Test public void toConfig() { QueueDetail queueDetail = TestUtils.createQueueDetail("test"); QueueConfig expectedConfig = QueueConfig.builder() .name(queueDetail.getName()) .numRetry(queueDetail.getNumRetry()) .queueName(queueDetail.getQueueName()) .delayedQueueName(queueDetail.getDelayedQueueName()) .processingQueueName(queueDetail.getProcessingQueueName()) .visibilityTimeout(queueDetail.getVisibilityTimeout()) .deadLetterQueues(new LinkedList<>()) .concurrency(queueDetail.getConcurrency().toMinMax()) .priority(queueDetail.getPriority()) .priorityGroup(queueDetail.getPriorityGroup()) .systemGenerated(queueDetail.isSystemGenerated()) .build(); QueueConfig queueConfig = queueDetail.toConfig(); assertNotNull(queueConfig.getUpdatedOn()); assertNotNull(queueConfig.getCreatedOn()); assertNull(queueConfig.getDeletedOn()); assertFalse(queueConfig.isDeleted()); queueConfig.setUpdatedOn(null); queueConfig.setCreatedOn(null); assertEquals(expectedConfig, queueConfig); QueueDetail queueDetail2 = TestUtils.createQueueDetail("test", "test-dlq"); QueueConfig queueConfig1 = queueDetail2.toConfig(); assertEquals( Collections.singletonList(new DeadLetterQueue("test-dlq", false)), queueConfig1.getDeadLetterQueues()); }