{"id":3842,"date":"2025-12-24T10:01:14","date_gmt":"2025-12-24T15:01:14","guid":{"rendered":"https:\/\/www.mymiller.name\/wordpress\/?p=3842"},"modified":"2025-12-24T10:01:14","modified_gmt":"2025-12-24T15:01:14","slug":"taming-the-stream-effective-unit-testing-with-kafka-in-spring-boot","status":"publish","type":"post","link":"https:\/\/www.mymiller.name\/wordpress\/spring_messaging\/taming-the-stream-effective-unit-testing-with-kafka-in-spring-boot\/","title":{"rendered":"Taming the Stream: Effective Unit Testing with Kafka in Spring Boot"},"content":{"rendered":"\n<div class=\"wp-block-jetpack-markdown\"><p>Kafka\u2019s asynchronous, distributed nature introduces unique challenges to testing. Unlike traditional synchronous systems, testing Kafka interactions requires verifying message production, consumption, and handling potential asynchronous delays. This article explores strategies for robust unit testing of Kafka components within a Spring Boot application.<\/p>\n<p><strong>Understanding the Testing Landscape<\/strong><\/p>\n<p>Before diving into specifics, let\u2019s clarify the scope of unit testing in a Kafka context:<\/p>\n<ul>\n<li><strong>Unit Tests (Focus):<\/strong>\n<ul>\n<li>Verifying the logic of your producer and consumer code in isolation.<\/li>\n<li>Ensuring correct message serialization and deserialization.<\/li>\n<li>Testing error handling within producer\/consumer methods.<\/li>\n<li>Mocking Kafka dependencies to control behavior and avoid external broker reliance.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Integration Tests (Beyond Scope):<\/strong>\n<ul>\n<li>Testing end-to-end Kafka flows, including broker interactions, topic configurations, and distributed behavior.<\/li>\n<li>These typically require a running Kafka broker (e.g., using Testcontainers) and are better suited for integration or end-to-end testing.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Tools and Techniques<\/strong><\/p>\n<p>Given your preference for Spring Boot, we\u2019ll leverage Spring Kafka\u2019s testing utilities alongside standard Java testing frameworks.<\/p>\n<ol>\n<li>\n<p><strong>Spring Kafka Test:<\/strong><\/p>\n<ul>\n<li>Spring Kafka provides <code>EmbeddedKafka<\/code>, a convenient way to spin up an in-memory Kafka broker for testing. While technically an integration test component, it can be used judiciously in unit tests for verifying producer\/consumer wiring.<\/li>\n<li><code>@EmbeddedKafka<\/code>: Class-level annotation to start an embedded Kafka broker.<\/li>\n<li><code>KafkaTemplateTestUtils<\/code>: Utilities for sending and receiving messages from the embedded broker.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Mockito:<\/strong><\/p>\n<ul>\n<li>Essential for mocking Kafka dependencies (e.g., <code>KafkaTemplate<\/code>, <code>ConsumerFactory<\/code>) to isolate your code.<\/li>\n<li>Allows you to simulate various Kafka behaviors (e.g., successful message sends, message send failures, consumer poll results).<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>JUnit\/AssertJ:<\/strong><\/p>\n<ul>\n<li>Standard Java testing frameworks for writing assertions and structuring your tests.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>Unit Testing Strategies<\/strong><\/p>\n<ol>\n<li>\n<p><strong>Testing Producers:<\/strong><\/p>\n<ul>\n<li><strong>Focus:<\/strong> Verify that your producer code correctly serializes messages, handles send results (success\/failure), and invokes the <code>KafkaTemplate<\/code> appropriately.<\/li>\n<li><strong>Approach:<\/strong>\n<ul>\n<li>Mock <code>KafkaTemplate<\/code> to control its behavior.<\/li>\n<li>Use <code>ArgumentCaptor<\/code> to capture the messages sent to <code>KafkaTemplate<\/code>.<\/li>\n<li>Assert that the correct message and topic are used.<\/li>\n<li>Simulate successful and failed sends by configuring the <code>KafkaTemplate<\/code> mock.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code class=\"language-java\">import org.apache.kafka.clients.producer.ProducerRecord;\nimport org.junit.jupiter.api.Test;\nimport org.mockito.ArgumentCaptor;\nimport org.mockito.Mockito;\nimport org.springframework.kafka.core.KafkaTemplate;\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.mockito.Mockito.verify;\nimport static org.mockito.Mockito.when;\n\nclass MyProducerTest {\n\n    private final KafkaTemplate&lt;String, String&gt; kafkaTemplate = Mockito.mock(KafkaTemplate.class);\n    private final MyProducer producer = new MyProducer(kafkaTemplate);\n\n    @Test\n    void testSendMessageSuccess() {\n        String topic = &quot;my-topic&quot;;\n        String message = &quot;Hello, Kafka!&quot;;\n        when(kafkaTemplate.send(Mockito.anyString(), Mockito.anyString())).thenReturn(Mockito.mock(org.springframework.util.concurrent.ListenableFuture.class)); \/\/ Simulate success\n\n        producer.sendMessage(topic, message);\n\n        ArgumentCaptor&lt;String&gt; topicCaptor = ArgumentCaptor.forClass(String.class);\n        ArgumentCaptor&lt;String&gt; messageCaptor = ArgumentCaptor.forClass(String.class);\n        verify(kafkaTemplate).send(topicCaptor.capture(), messageCaptor.capture());\n        assertEquals(topic, topicCaptor.getValue());\n        assertEquals(message, messageCaptor.getValue());\n    }\n\n    @Test\n    void testSendMessageFailure() {\n        String topic = &quot;my-topic&quot;;\n        String message = &quot;Hello, Kafka!&quot;;\n        when(kafkaTemplate.send(Mockito.anyString(), Mockito.anyString())).thenThrow(new RuntimeException(&quot;Kafka send failed&quot;));\n\n        try {\n            producer.sendMessage(topic, message);\n        } catch (RuntimeException e) {\n            assertEquals(&quot;Kafka send failed&quot;, e.getMessage());\n        }\n    }\n}\n<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>Testing Consumers:<\/strong><\/p>\n<ul>\n<li><strong>Focus:<\/strong> Verify that your consumer code correctly deserializes messages, processes them, and handles potential errors during consumption.<\/li>\n<li><strong>Approach:<\/strong>\n<ul>\n<li>Mock <code>ConsumerFactory<\/code> to control the <code>Consumer<\/code> behavior.<\/li>\n<li>Simulate consumer poll results by providing a list of <code>ConsumerRecord<\/code> objects.<\/li>\n<li>Assert that the consumer processes the messages correctly.<\/li>\n<li>Test error handling logic (e.g., retries, dead-letter queues).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code class=\"language-java\">import org.apache.kafka.clients.consumer.ConsumerRecord;\nimport org.apache.kafka.clients.consumer.ConsumerRecords;\nimport org.apache.kafka.clients.consumer.KafkaConsumer;\nimport org.junit.jupiter.api.Test;\nimport org.mockito.Mockito;\nimport org.springframework.kafka.listener.ConsumerFactory;\nimport java.time.Duration;\nimport java.util.Collections;\nimport static org.mockito.Mockito.when;\n\nclass MyConsumerTest {\n\n    @SuppressWarnings(&quot;unchecked&quot;)\n    private final ConsumerFactory&lt;String, String&gt; consumerFactory = Mockito.mock(ConsumerFactory.class);\n    @SuppressWarnings(&quot;unchecked&quot;)\n    private final KafkaConsumer&lt;String, String&gt; kafkaConsumer = Mockito.mock(KafkaConsumer.class);\n    private final MyConsumer consumer = new MyConsumer();\n\n    @Test\n    void testConsumeMessage() {\n        String topic = &quot;my-topic&quot;;\n        String message = &quot;Processed: Hello, Kafka!&quot;;\n        ConsumerRecord&lt;String, String&gt; record = new ConsumerRecord&lt;&gt;(topic, 0, 0, &quot;key&quot;, &quot;Hello, Kafka!&quot;);\n        ConsumerRecords&lt;String, String&gt; records = new ConsumerRecords&lt;&gt;(Collections.singletonMap(new org.apache.kafka.common.TopicPartition(topic, 0), Collections.singletonList(record)));\n\n        when(consumerFactory.createConsumer()).thenReturn(kafkaConsumer);\n        when(kafkaConsumer.poll(Duration.ofMillis(100))).thenReturn(records);\n\n        consumer.consume(record.value());\n        assertEquals(&quot;Processed: Hello, Kafka!&quot;, message);\n    }\n}\n<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>Testing with <code>@EmbeddedKafka<\/code> (Use Judiciously):<\/strong><\/p>\n<ul>\n<li>While primarily for integration tests, <code>@EmbeddedKafka<\/code> can be used in unit tests to verify the wiring between your producer and consumer.<\/li>\n<li><strong>Caution:<\/strong> Avoid extensive business logic testing with <code>@EmbeddedKafka<\/code> in unit tests, as it blurs the line with integration testing.<\/li>\n<\/ul>\n<pre><code class=\"language-java\">import org.junit.jupiter.api.Test;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.kafka.test.context.EmbeddedKafka;\nimport org.springframework.test.annotation.DirtiesContext;\nimport java.util.concurrent.TimeUnit;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n\n@SpringBootTest\n@EmbeddedKafka(topics = &quot;my-topic&quot;, partitions = 1)\n@DirtiesContext\nclass EmbeddedKafkaTest {\n\n    @Autowired\n    private MyProducer producer;\n\n    @Autowired\n    private MyConsumer consumer;\n\n    @Test\n    void testProducerConsumer() throws Exception {\n        producer.sendMessage(&quot;my-topic&quot;, &quot;Test Message&quot;);\n        TimeUnit.SECONDS.sleep(5); \/\/ Allow time for processing\n        assertTrue(consumer.isMessageConsumed());\n    }\n}\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p><strong>Best Practices<\/strong><\/p>\n<ul>\n<li><strong>Isolate Your Code:<\/strong> Use mocking extensively to isolate your producer and consumer logic from external Kafka dependencies.<\/li>\n<li><strong>Test Edge Cases:<\/strong> Cover scenarios like message send failures, invalid message formats, consumer exceptions, and retries.<\/li>\n<li><strong>Verify Asynchronous Behavior:<\/strong> Be mindful of the asynchronous nature of Kafka. Use appropriate techniques (e.g., <code>CountDownLatch<\/code>, <code>awaitility<\/code>) to verify asynchronous message processing.<\/li>\n<li><strong>Keep Tests Fast:<\/strong> Unit tests should be quick to execute. Avoid excessive delays or complex setups.<\/li>\n<li><strong>Clear Assertions:<\/strong> Write clear and concise assertions that pinpoint the expected behavior.<\/li>\n<\/ul>\n<p>By following these strategies, you can write effective unit tests for your Kafka components in Spring Boot, ensuring the reliability and robustness of your event-driven applications.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":3537,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[438],"tags":[],"series":[],"class_list":["post-3842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring_messaging"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/intro-7400243_640.jpg?fit=640%2C334&ssl=1","jetpack-related-posts":[{"id":3928,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/%f0%9f%92%a1-implementing-cqrs-with-spring-boot-and-kafka\/","url_meta":{"origin":3842,"position":0},"title":"\ud83d\udca1 Implementing CQRS with Spring Boot and Kafka","author":"Jeffery Miller","date":"November 21, 2025","format":false,"excerpt":"As a software architect, I constantly look for patterns that enhance the scalability and maintainability of microservices. The Command Query Responsibility Segregation (CQRS) pattern is a powerful tool for this, especially when coupled with event-driven architecture (EDA) using Apache Kafka. CQRS separates the application into two distinct models: one for\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/data-2899902_1280.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/data-2899902_1280.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/data-2899902_1280.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/data-2899902_1280.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/data-2899902_1280.avif 3x"},"classes":[]},{"id":3890,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_messaging\/spring-cloud-stream\/","url_meta":{"origin":3842,"position":1},"title":"Spring Cloud Stream","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Spring Cloud Stream is a framework for building highly scalable, event-driven microservices that are connected by a shared messaging system. In simple terms, it's a powerful tool that takes away the complexity of communicating with message brokers like RabbitMQ or Apache Kafka, allowing you to focus purely on your application's\u2026","rel":"","context":"In &quot;Spring Messaging&quot;","block_context":{"text":"Spring Messaging","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_messaging\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/11\/network-3152677_640.jpg?fit=640%2C427&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/11\/network-3152677_640.jpg?fit=640%2C427&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/11\/network-3152677_640.jpg?fit=640%2C427&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3836,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_rest\/testing-the-waters-writing-effective-unit-tests-for-spring-data-rest-apis\/","url_meta":{"origin":3842,"position":2},"title":"Testing the Waters: Writing Effective Unit Tests for Spring Data REST APIs","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Spring Data REST is a powerful tool for rapidly exposing your JPA entities as RESTful APIs with minimal code. However, the \u201cminimal code\u201d aspect doesn\u2019t absolve you from the crucial responsibility of writing unit tests. While Spring Data REST handles much of the underlying API infrastructure, your business logic, entity\u2026","rel":"","context":"In &quot;Spring Rest&quot;","block_context":{"text":"Spring Rest","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_rest\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/ai-generated-8136170_1280-png.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/ai-generated-8136170_1280-png.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/ai-generated-8136170_1280-png.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/ai-generated-8136170_1280-png.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/ai-generated-8136170_1280-png.avif 3x"},"classes":[]},{"id":3844,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_messaging\/the-power-of-kafka-connect\/","url_meta":{"origin":3842,"position":3},"title":"The Power of Kafka Connect","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Kafka Connect is a powerful framework for streaming data between Kafka and other systems in a scalable and reliable way. Connectors handle the complexities of data integration, allowing you to focus on your core application logic. Sink Connectors are used to export data from Kafka to other systems, and in\u2026","rel":"","context":"In &quot;Spring Messaging&quot;","block_context":{"text":"Spring Messaging","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_messaging\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/ai-generated-8131434_1280-png.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/ai-generated-8131434_1280-png.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/ai-generated-8131434_1280-png.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/ai-generated-8131434_1280-png.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/ai-generated-8131434_1280-png.avif 3x"},"classes":[]},{"id":3846,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/speed-and-reliability-unit-testing-with-mongodb-memory-server-in-spring-boot\/","url_meta":{"origin":3842,"position":4},"title":"Speed and Reliability: Unit Testing with MongoDB Memory Server in Spring Boot","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"When you\u2019re building Spring Boot applications that interact with MongoDB, ensuring the reliability of your data access layer is crucial. Unit tests play a vital role, but setting up and tearing down a real MongoDB instance for each test can be slow and cumbersome. This is where MongoDB Memory Server\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/scientist-9234951_1280-png.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/scientist-9234951_1280-png.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/scientist-9234951_1280-png.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/scientist-9234951_1280-png.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/04\/scientist-9234951_1280-png.avif 3x"},"classes":[]},{"id":3878,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_messaging\/building-robust-kafka-applications-with-spring-boot-and-avro-schema-registry\/","url_meta":{"origin":3842,"position":5},"title":"Building Robust Kafka Applications with Spring Boot, and Avro Schema Registry","author":"Jeffery Miller","date":"November 24, 2025","format":false,"excerpt":"As a software architect, designing solutions that are scalable, maintainable, and resilient is paramount. In the world of event-driven architectures, Apache Kafka has become a cornerstone for high-throughput, low-latency data streaming. However, simply sending raw bytes over Kafka topics can lead to data inconsistency and make future evolution a nightmare.\u2026","rel":"","context":"In &quot;Spring Messaging&quot;","block_context":{"text":"Spring Messaging","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_messaging\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/06\/ai-generated-7947638_1280.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/06\/ai-generated-7947638_1280.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/06\/ai-generated-7947638_1280.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/06\/ai-generated-7947638_1280.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/06\/ai-generated-7947638_1280.avif 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/3842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/comments?post=3842"}],"version-history":[{"count":1,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/3842\/revisions"}],"predecessor-version":[{"id":3843,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/3842\/revisions\/3843"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media\/3537"}],"wp:attachment":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media?parent=3842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/categories?post=3842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/tags?post=3842"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/series?post=3842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}