How to mock a method that returns Mono<Void>
?
I have this method that returns Mono<Void>
public Mono<Void> deleteMethod(Post post) {
return statusRepository.delete(post);
}
In my test class I want to do something like this
given(statusRepository.delete(any(Post.class))).willReturn(Mono.empty());
Is there any better way to do this?
Can someone help me?
Thanks.