test: Simplified & Unified the Kafka-tests
[demos/kafka/chat] / src / test / java / de / juplo / kafka / chat / backend / domain / ChatHomeServiceTest.java
index 2db530e..858d03d 100644 (file)
@@ -1,11 +1,10 @@
 package de.juplo.kafka.chat.backend.domain;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
 import de.juplo.kafka.chat.backend.ChatBackendProperties;
 import de.juplo.kafka.chat.backend.domain.exceptions.LoadInProgressException;
 import de.juplo.kafka.chat.backend.domain.exceptions.UnknownChatroomException;
 import de.juplo.kafka.chat.backend.implementation.inmemory.InMemoryServicesConfiguration;
+import de.juplo.kafka.chat.backend.implementation.kafka.KafkaServicesConfiguration;
 import de.juplo.kafka.chat.backend.storage.files.FilesStorageConfiguration;
 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
@@ -26,6 +25,7 @@ import static pl.rzrz.assertj.reactor.Assertions.assertThat;
 @SpringJUnitConfig(classes = {
     InMemoryServicesConfiguration.class,
     FilesStorageConfiguration.class,
+    KafkaServicesConfiguration.class,
     ChatHomeServiceTest.TestConfiguration.class })
 @EnableConfigurationProperties(ChatBackendProperties.class)
 public abstract class ChatHomeServiceTest
@@ -79,14 +79,6 @@ public abstract class ChatHomeServiceTest
 
   static class TestConfiguration
   {
-    @Bean
-    ObjectMapper objectMapper()
-    {
-      ObjectMapper objectMapper = new ObjectMapper();
-      objectMapper.registerModule(new JavaTimeModule());
-      return objectMapper;
-    }
-
     @Bean
     Clock clock()
     {