ChatRoom chatRoom = new ChatRoom(
chatroomId,
"Test-ChatRoom",
+ 0,
Clock.systemDefaultZone(),
chatRoomService, 8);
when(chatHomeService.getChatRoom(anyInt(), any(UUID.class))).thenReturn(Mono.just(chatRoom));
.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(Message.class));
+ .thenReturn(Mono.just(mock(Message.class)));
// When
client
ChatRoom chatRoom = new ChatRoom(
chatroomId,
"Test-ChatRoom",
+ 0,
Clock.systemDefaultZone(),
chatRoomService, 8);
when(chatHomeService.getChatRoom(anyInt(), any(UUID.class)))
.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(Message.class));
+ .thenReturn(Mono.just(mock(Message.class)));
// When
client