Vidyalelo
Java Programming · Q38

Java Autoboxing

Programming · Java Programming · question 38

Q38

How can we simulate if then behavior in Junits?

A.
if{..} else{..}
B.
if(..){..} else{..}
C.
Mockito.when(...).thenReturn(...);
Answer
D.
Mockito.if(..).then(..);

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board