From: Kai Moritz Date: Fri, 8 Mar 2024 11:24:52 +0000 (+0100) Subject: test: Removed unnecessary Mockito-recordings in `ChatRoomDataTest` X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=6d9a0d16b92ad32f6b2ab985e6b6d05e5c535dca;p=demos%2Fkafka%2Fchat test: Removed unnecessary Mockito-recordings in `ChatRoomDataTest` --- diff --git a/src/test/java/de/juplo/kafka/chat/backend/domain/ChatRoomDataTest.java b/src/test/java/de/juplo/kafka/chat/backend/domain/ChatRoomDataTest.java index 641dc6af..34626b14 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/domain/ChatRoomDataTest.java +++ b/src/test/java/de/juplo/kafka/chat/backend/domain/ChatRoomDataTest.java @@ -116,7 +116,6 @@ public class ChatRoomDataTest String messageText = "Bar"; Message message = new Message(key, 0l, timestamp, messageText); when(chatMessageService.getMessage(any(Message.MessageKey.class))).thenReturn(Mono.just(message)); - when(chatMessageService.persistMessage(any(Message.MessageKey.class), any(LocalDateTime.class), any(String.class))).thenReturn(Mono.just(message)); // When Mono mono = chatRoomData.addMessage(messageId, user, messageText); @@ -133,7 +132,6 @@ public class ChatRoomDataTest String messageText = "Bar"; Message message = new Message(key, 0l, timestamp, messageText); when(chatMessageService.getMessage(any(Message.MessageKey.class))).thenReturn(Mono.just(message)); - when(chatMessageService.persistMessage(any(Message.MessageKey.class), any(LocalDateTime.class), any(String.class))).thenReturn(Mono.just(message)); // When chatRoomData @@ -153,7 +151,6 @@ public class ChatRoomDataTest String mutatedText = "Boom!"; Message message = new Message(key, 0l, timestamp, messageText); when(chatMessageService.getMessage(any(Message.MessageKey.class))).thenReturn(Mono.just(message)); - when(chatMessageService.persistMessage(any(Message.MessageKey.class), any(LocalDateTime.class), any(String.class))).thenReturn(Mono.just(message)); // When Mono mono = chatRoomData.addMessage(messageId, user, mutatedText); @@ -171,7 +168,6 @@ public class ChatRoomDataTest String mutatedText = "Boom!"; Message message = new Message(key, 0l, timestamp, messageText); when(chatMessageService.getMessage(any(Message.MessageKey.class))).thenReturn(Mono.just(message)); - when(chatMessageService.persistMessage(any(Message.MessageKey.class), any(LocalDateTime.class), any(String.class))).thenReturn(Mono.just(message)); // When chatRoomData