How to mock RedissionClient.createBatch()

Viewed 25

I'm trying to unit test a piece of code and I want to mock the redissionClient.createBatch() method call which returns the RBatch object.

Code snippet looks like:

RBatch batch =redissonClient.createBatch();

How do I handle

Mockito.when(redissonClient.createBatch()).thenReturn(*!!facing issue here in object creation!!*)
0 Answers
Related