Can I do something like this:
final var msg = Mockito.when(mapper.map(request)).thenReturn(message);
final var resp = Mockito.when(messaging.send(msg.getMock())).thenReturn(response);
Instead of msg inside messaging.send() I have Mockito.any(), if I try with msg I am getting a ClassCastException.
Is something like that possible in any way?
Aucun commentaire:
Enregistrer un commentaire