refactor: Made `SimpleChatHome` an implementation of `ChatHome`
[demos/kafka/chat] / src / test / java / de / juplo / kafka / chat / backend / api / ChatBackendControllerTest.java
index 12d34be..b1c80a9 100644 (file)
@@ -262,12 +262,12 @@ public class ChatBackendControllerTest
     @Bean
     ChatHome[] chatHomes(
         ChatBackendProperties properties,
-        ChatHomeFactory factory)
+        InMemoryChatHomeService service)
     {
-      ChatHome[] chatHomes = new ChatHome[properties.getInmemory().getNumShards()];
+      SimpleChatHome[] chatHomes = new SimpleChatHome[properties.getInmemory().getNumShards()];
       Arrays
           .stream(properties.getInmemory().getOwnedShards())
-          .forEach(i -> chatHomes[i] = factory.createChatHome(i));
+          .forEach(i -> chatHomes[i] = new SimpleChatHome(service, i));
       return chatHomes;
     }
   }