WIP:refactor
authorKai Moritz <kai@juplo.de>
Tue, 24 Jan 2023 18:10:36 +0000 (19:10 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 24 Jan 2023 18:10:36 +0000 (19:10 +0100)
src/test/java/de/juplo/kafka/chat/backend/api/ChatBackendControllerTest.java

index af23529..b72294d 100644 (file)
@@ -183,7 +183,7 @@ public class ChatBackendControllerTest
         .thenReturn(Mono.just(existingMessage));
     // Needed for readable error-reports, in case of a bug that leads to according unwanted call
     when(chatRoomService.persistMessage(any(Message.MessageKey.class), any(LocalDateTime.class), any(String.class)))
-        .thenReturn(mock(Mono.class));
+        .thenReturn(Mono.just(mock(Message.class)));
 
     // When
     client
@@ -231,7 +231,7 @@ public class ChatBackendControllerTest
         .thenReturn(Mono.empty());
     // Needed for readable error-reports, in case of a bug that leads to according unwanted call
     when(chatRoomService.persistMessage(any(Message.MessageKey.class), any(LocalDateTime.class), any(String.class)))
-        .thenReturn(mock(Mono.class));
+        .thenReturn(Mono.just(mock(Message.class)));
 
     // When
     client